diff options
Diffstat (limited to 'net/ipv4/fib_semantics.c')
-rw-r--r-- | net/ipv4/fib_semantics.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c index 029362d66135..c886b28ba9f5 100644 --- a/net/ipv4/fib_semantics.c +++ b/net/ipv4/fib_semantics.c | |||
@@ -276,7 +276,7 @@ void rtmsg_fib(int event, u32 key, struct fib_alias *fa, | |||
276 | struct nlmsghdr *n, struct netlink_skb_parms *req) | 276 | struct nlmsghdr *n, struct netlink_skb_parms *req) |
277 | { | 277 | { |
278 | struct sk_buff *skb; | 278 | struct sk_buff *skb; |
279 | u32 pid = req ? req->pid : 0; | 279 | u32 pid = req ? req->pid : n->nlmsg_pid; |
280 | int size = NLMSG_SPACE(sizeof(struct rtmsg)+256); | 280 | int size = NLMSG_SPACE(sizeof(struct rtmsg)+256); |
281 | 281 | ||
282 | skb = alloc_skb(size, GFP_KERNEL); | 282 | skb = alloc_skb(size, GFP_KERNEL); |
@@ -286,7 +286,7 @@ void rtmsg_fib(int event, u32 key, struct fib_alias *fa, | |||
286 | if (fib_dump_info(skb, pid, n->nlmsg_seq, event, tb_id, | 286 | if (fib_dump_info(skb, pid, n->nlmsg_seq, event, tb_id, |
287 | fa->fa_type, fa->fa_scope, &key, z, | 287 | fa->fa_type, fa->fa_scope, &key, z, |
288 | fa->fa_tos, | 288 | fa->fa_tos, |
289 | fa->fa_info) < 0) { | 289 | fa->fa_info, 0) < 0) { |
290 | kfree_skb(skb); | 290 | kfree_skb(skb); |
291 | return; | 291 | return; |
292 | } | 292 | } |
@@ -932,13 +932,13 @@ u32 __fib_res_prefsrc(struct fib_result *res) | |||
932 | int | 932 | int |
933 | fib_dump_info(struct sk_buff *skb, u32 pid, u32 seq, int event, | 933 | fib_dump_info(struct sk_buff *skb, u32 pid, u32 seq, int event, |
934 | u8 tb_id, u8 type, u8 scope, void *dst, int dst_len, u8 tos, | 934 | u8 tb_id, u8 type, u8 scope, void *dst, int dst_len, u8 tos, |
935 | struct fib_info *fi) | 935 | struct fib_info *fi, unsigned int flags) |
936 | { | 936 | { |
937 | struct rtmsg *rtm; | 937 | struct rtmsg *rtm; |
938 | struct nlmsghdr *nlh; | 938 | struct nlmsghdr *nlh; |
939 | unsigned char *b = skb->tail; | 939 | unsigned char *b = skb->tail; |
940 | 940 | ||
941 | nlh = NLMSG_PUT(skb, pid, seq, event, sizeof(*rtm)); | 941 | nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*rtm), flags); |
942 | rtm = NLMSG_DATA(nlh); | 942 | rtm = NLMSG_DATA(nlh); |
943 | rtm->rtm_family = AF_INET; | 943 | rtm->rtm_family = AF_INET; |
944 | rtm->rtm_dst_len = dst_len; | 944 | rtm->rtm_dst_len = dst_len; |
@@ -1035,7 +1035,7 @@ fib_convert_rtentry(int cmd, struct nlmsghdr *nl, struct rtmsg *rtm, | |||
1035 | } | 1035 | } |
1036 | 1036 | ||
1037 | nl->nlmsg_flags = NLM_F_REQUEST; | 1037 | nl->nlmsg_flags = NLM_F_REQUEST; |
1038 | nl->nlmsg_pid = 0; | 1038 | nl->nlmsg_pid = current->pid; |
1039 | nl->nlmsg_seq = 0; | 1039 | nl->nlmsg_seq = 0; |
1040 | nl->nlmsg_len = NLMSG_LENGTH(sizeof(*rtm)); | 1040 | nl->nlmsg_len = NLMSG_LENGTH(sizeof(*rtm)); |
1041 | if (cmd == SIOCDELRT) { | 1041 | if (cmd == SIOCDELRT) { |