aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/fib_semantics.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2012-10-09 18:35:22 -0400
committerJ. Bruce Fields <bfields@redhat.com>2012-10-09 18:35:22 -0400
commitf474af7051212b4efc8267583fad9c4ebf33ccff (patch)
tree1aa46ebc8065a341f247c2a2d9af2f624ad1d4f8 /net/ipv4/fib_semantics.c
parent0d22f68f02c10d5d10ec5712917e5828b001a822 (diff)
parente3dd9a52cb5552c46c2a4ca7ccdfb4dab5c72457 (diff)
nfs: disintegrate UAPI for nfs
This is to complete part of the Userspace API (UAPI) disintegration for which the preparatory patches were pulled recently. After these patches, userspace headers will be segregated into: include/uapi/linux/.../foo.h for the userspace interface stuff, and: include/linux/.../foo.h for the strictly kernel internal stuff. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net/ipv4/fib_semantics.c')
-rw-r--r--net/ipv4/fib_semantics.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index da80dc14cc7..267753060ff 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -314,6 +314,7 @@ static struct fib_info *fib_find_info(const struct fib_info *nfi)
314 nfi->fib_scope == fi->fib_scope && 314 nfi->fib_scope == fi->fib_scope &&
315 nfi->fib_prefsrc == fi->fib_prefsrc && 315 nfi->fib_prefsrc == fi->fib_prefsrc &&
316 nfi->fib_priority == fi->fib_priority && 316 nfi->fib_priority == fi->fib_priority &&
317 nfi->fib_type == fi->fib_type &&
317 memcmp(nfi->fib_metrics, fi->fib_metrics, 318 memcmp(nfi->fib_metrics, fi->fib_metrics,
318 sizeof(u32) * RTAX_MAX) == 0 && 319 sizeof(u32) * RTAX_MAX) == 0 &&
319 ((nfi->fib_flags ^ fi->fib_flags) & ~RTNH_F_DEAD) == 0 && 320 ((nfi->fib_flags ^ fi->fib_flags) & ~RTNH_F_DEAD) == 0 &&
@@ -391,7 +392,7 @@ void rtmsg_fib(int event, __be32 key, struct fib_alias *fa,
391 if (skb == NULL) 392 if (skb == NULL)
392 goto errout; 393 goto errout;
393 394
394 err = fib_dump_info(skb, info->pid, seq, event, tb_id, 395 err = fib_dump_info(skb, info->portid, seq, event, tb_id,
395 fa->fa_type, key, dst_len, 396 fa->fa_type, key, dst_len,
396 fa->fa_tos, fa->fa_info, nlm_flags); 397 fa->fa_tos, fa->fa_info, nlm_flags);
397 if (err < 0) { 398 if (err < 0) {
@@ -400,7 +401,7 @@ void rtmsg_fib(int event, __be32 key, struct fib_alias *fa,
400 kfree_skb(skb); 401 kfree_skb(skb);
401 goto errout; 402 goto errout;
402 } 403 }
403 rtnl_notify(skb, info->nl_net, info->pid, RTNLGRP_IPV4_ROUTE, 404 rtnl_notify(skb, info->nl_net, info->portid, RTNLGRP_IPV4_ROUTE,
404 info->nlh, GFP_KERNEL); 405 info->nlh, GFP_KERNEL);
405 return; 406 return;
406errout: 407errout:
@@ -833,6 +834,7 @@ struct fib_info *fib_create_info(struct fib_config *cfg)
833 fi->fib_flags = cfg->fc_flags; 834 fi->fib_flags = cfg->fc_flags;
834 fi->fib_priority = cfg->fc_priority; 835 fi->fib_priority = cfg->fc_priority;
835 fi->fib_prefsrc = cfg->fc_prefsrc; 836 fi->fib_prefsrc = cfg->fc_prefsrc;
837 fi->fib_type = cfg->fc_type;
836 838
837 fi->fib_nhs = nhs; 839 fi->fib_nhs = nhs;
838 change_nexthops(fi) { 840 change_nexthops(fi) {
@@ -989,14 +991,14 @@ failure:
989 return ERR_PTR(err); 991 return ERR_PTR(err);
990} 992}
991 993
992int fib_dump_info(struct sk_buff *skb, u32 pid, u32 seq, int event, 994int fib_dump_info(struct sk_buff *skb, u32 portid, u32 seq, int event,
993 u32 tb_id, u8 type, __be32 dst, int dst_len, u8 tos, 995 u32 tb_id, u8 type, __be32 dst, int dst_len, u8 tos,
994 struct fib_info *fi, unsigned int flags) 996 struct fib_info *fi, unsigned int flags)
995{ 997{
996 struct nlmsghdr *nlh; 998 struct nlmsghdr *nlh;
997 struct rtmsg *rtm; 999 struct rtmsg *rtm;
998 1000
999 nlh = nlmsg_put(skb, pid, seq, event, sizeof(*rtm), flags); 1001 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*rtm), flags);
1000 if (nlh == NULL) 1002 if (nlh == NULL)
1001 return -EMSGSIZE; 1003 return -EMSGSIZE;
1002 1004