diff options
author | Paul Moore <pmoore@redhat.com> | 2013-03-06 06:45:24 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-07 16:20:23 -0500 |
commit | 0c1233aba1e948c37f6dc7620cb7c253fcd71ce9 (patch) | |
tree | 50cb5865bd1ffc0f92a5ee1a75cdce5cf82879b3 | |
parent | 260055bb1f1f8b5328601816c50fd7e0dfda7dff (diff) |
netlabel: correctly list all the static label mappings
When we have a large number of static label mappings that spill across
the netlink message boundary we fail to properly save our state in the
netlink_callback struct which causes us to repeat the same listings.
This patch fixes this problem by saving the state correctly between
calls to the NetLabel static label netlink "dumpit" routines.
Signed-off-by: Paul Moore <pmoore@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/netlabel/netlabel_unlabeled.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/netlabel/netlabel_unlabeled.c b/net/netlabel/netlabel_unlabeled.c index 847d495cd4de..85742b76eb3e 100644 --- a/net/netlabel/netlabel_unlabeled.c +++ b/net/netlabel/netlabel_unlabeled.c | |||
@@ -1250,10 +1250,10 @@ static int netlbl_unlabel_staticlist(struct sk_buff *skb, | |||
1250 | 1250 | ||
1251 | unlabel_staticlist_return: | 1251 | unlabel_staticlist_return: |
1252 | rcu_read_unlock(); | 1252 | rcu_read_unlock(); |
1253 | cb->args[0] = skip_bkt; | 1253 | cb->args[0] = iter_bkt; |
1254 | cb->args[1] = skip_chain; | 1254 | cb->args[1] = iter_chain; |
1255 | cb->args[2] = skip_addr4; | 1255 | cb->args[2] = iter_addr4; |
1256 | cb->args[3] = skip_addr6; | 1256 | cb->args[3] = iter_addr6; |
1257 | return skb->len; | 1257 | return skb->len; |
1258 | } | 1258 | } |
1259 | 1259 | ||
@@ -1320,8 +1320,8 @@ static int netlbl_unlabel_staticlistdef(struct sk_buff *skb, | |||
1320 | 1320 | ||
1321 | unlabel_staticlistdef_return: | 1321 | unlabel_staticlistdef_return: |
1322 | rcu_read_unlock(); | 1322 | rcu_read_unlock(); |
1323 | cb->args[0] = skip_addr4; | 1323 | cb->args[0] = iter_addr4; |
1324 | cb->args[1] = skip_addr6; | 1324 | cb->args[1] = iter_addr6; |
1325 | return skb->len; | 1325 | return skb->len; |
1326 | } | 1326 | } |
1327 | 1327 | ||