projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
928a5ae
)
Fix a problem with not allocating enough room for netlink messages.
author
Justin Pettit
<jpettit@nicira.com>
Thu, 17 Apr 2008 01:26:47 +0000
(18:26 -0700)
committer
Justin Pettit
<jpettit@nicira.com>
Thu, 17 Apr 2008 01:26:47 +0000
(18:26 -0700)
datapath/datapath.c
patch
|
blob
|
history
diff --git
a/datapath/datapath.c
b/datapath/datapath.c
index 8ab30011c6f37f8678cf9894533f8978f268d0b0..89c576742928a9fdc59fbb4cf76f5ea838f30641 100644
(file)
--- a/
datapath/datapath.c
+++ b/
datapath/datapath.c
@@
-105,7
+105,8
@@
alloc_openflow_skb(struct datapath *dp, size_t openflow_len, uint8_t type,
struct nlattr *attr;
struct ofp_header *oh;
- genl_len = nla_total_size(sizeof(uint32_t)); /* DP_GENL_A_DP_IDX */
+ genl_len = nlmsg_total_size(GENL_HDRLEN + dp_genl_family.hdrsize);
+ genl_len += nla_total_size(sizeof(uint32_t)); /* DP_GENL_A_DP_IDX */
genl_len += nla_total_size(openflow_len); /* DP_GENL_A_OPENFLOW */
skb = *pskb = genlmsg_new(genl_len, GFP_ATOMIC);
if (!skb) {