diff options
author | Thomas Graf <tgraf@suug.ch> | 2012-06-26 19:36:16 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-27 18:36:44 -0400 |
commit | 4c3af034fafeb7269176bf1310c9bcff0b9fd9bb (patch) | |
tree | e10a4be17401c237afc0b84edd386404174c4d05 /net | |
parent | 6b60978fde2b09a15d7aec0e15f2d3863bad2d24 (diff) |
netlink: Get rid of obsolete rtnetlink macros
Removes all RTA_GET*() and RTA_PUT*() variations, as well as the
the unused rtattr_strcmp(). Get rid of rtm_get_table() by moving
it to its only user decnet.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/rtnetlink.c | 13 | ||||
-rw-r--r-- | net/decnet/dn_fib.c | 8 |
2 files changed, 8 insertions, 13 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 21318d15bbc3..bc8a1cdaac98 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -541,19 +541,6 @@ static const int rta_max[RTM_NR_FAMILIES] = | |||
541 | [RTM_FAM(RTM_NEWACTION)] = TCAA_MAX, | 541 | [RTM_FAM(RTM_NEWACTION)] = TCAA_MAX, |
542 | }; | 542 | }; |
543 | 543 | ||
544 | void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const void *data) | ||
545 | { | ||
546 | struct rtattr *rta; | ||
547 | int size = RTA_LENGTH(attrlen); | ||
548 | |||
549 | rta = (struct rtattr *)skb_put(skb, RTA_ALIGN(size)); | ||
550 | rta->rta_type = attrtype; | ||
551 | rta->rta_len = size; | ||
552 | memcpy(RTA_DATA(rta), data, attrlen); | ||
553 | memset(RTA_DATA(rta) + attrlen, 0, RTA_ALIGN(size) - size); | ||
554 | } | ||
555 | EXPORT_SYMBOL(__rta_fill); | ||
556 | |||
557 | int rtnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, unsigned int group, int echo) | 544 | int rtnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, unsigned int group, int echo) |
558 | { | 545 | { |
559 | struct sock *rtnl = net->rtnl; | 546 | struct sock *rtnl = net->rtnl; |
diff --git a/net/decnet/dn_fib.c b/net/decnet/dn_fib.c index 7eaf98799729..102d6106a942 100644 --- a/net/decnet/dn_fib.c +++ b/net/decnet/dn_fib.c | |||
@@ -505,6 +505,14 @@ static int dn_fib_check_attr(struct rtmsg *r, struct rtattr **rta) | |||
505 | return 0; | 505 | return 0; |
506 | } | 506 | } |
507 | 507 | ||
508 | static inline u32 rtm_get_table(struct rtattr **rta, u8 table) | ||
509 | { | ||
510 | if (rta[RTA_TABLE - 1]) | ||
511 | table = nla_get_u32((struct nlattr *) rta[RTA_TABLE - 1]); | ||
512 | |||
513 | return table; | ||
514 | } | ||
515 | |||
508 | static int dn_fib_rtm_delroute(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) | 516 | static int dn_fib_rtm_delroute(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) |
509 | { | 517 | { |
510 | struct net *net = sock_net(skb->sk); | 518 | struct net *net = sock_net(skb->sk); |