#include "netlink.h"
#include "netlink-protocol.h"
#include "ofpbuf.h"
-#include "openflow-netlink.h"
-#include "openflow.h"
+#include "openflow/openflow-netlink.h"
+#include "openflow/openflow.h"
#include "packets.h"
#include "util.h"
#include "xtoxll.h"
void
dpif_close(struct dpif *dp)
{
- nl_sock_destroy(dp->sock);
+ if (dp) {
+ nl_sock_destroy(dp->sock);
+ }
}
static const struct nl_policy openflow_policy[] = {
[DP_GENL_A_DP_IDX] = { .type = NL_A_U32 },
[DP_GENL_A_OPENFLOW] = { .type = NL_A_UNSPEC,
.min_len = sizeof(struct ofp_header),
- .max_len = OFP_MAXLEN },
+ .max_len = 65535 },
};
/* Tries to receive an openflow message from the kernel on 'sock'. If