diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2009-06-02 01:14:27 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-03 05:51:02 -0400 |
commit | 511c3f92ad5b6d9f8f6464be1b4f85f0422be91a (patch) | |
tree | 3e368d9a78f87eb9dd7ff9e57f4aab3f4a96e3b1 /net/sctp/protocol.c | |
parent | dfbf97f3ac980b69dfbc41c83a208211a38443e8 (diff) |
net: skb->rtable accessor
Define skb_rtable(const struct sk_buff *skb) accessor to get rtable from skb
Delete skb->rtable field
Setting rtable is not allowed, just set dst instead as rtable is an alias.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/protocol.c')
-rw-r--r-- | net/sctp/protocol.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index 8eb3e61cb701..cb2c50dbd421 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -393,7 +393,7 @@ static int sctp_v4_addr_valid(union sctp_addr *addr, | |||
393 | return 0; | 393 | return 0; |
394 | 394 | ||
395 | /* Is this a broadcast address? */ | 395 | /* Is this a broadcast address? */ |
396 | if (skb && skb->rtable->rt_flags & RTCF_BROADCAST) | 396 | if (skb && skb_rtable(skb)->rt_flags & RTCF_BROADCAST) |
397 | return 0; | 397 | return 0; |
398 | 398 | ||
399 | return 1; | 399 | return 1; |
@@ -572,7 +572,7 @@ static void sctp_v4_get_saddr(struct sctp_sock *sk, | |||
572 | /* What interface did this skb arrive on? */ | 572 | /* What interface did this skb arrive on? */ |
573 | static int sctp_v4_skb_iif(const struct sk_buff *skb) | 573 | static int sctp_v4_skb_iif(const struct sk_buff *skb) |
574 | { | 574 | { |
575 | return skb->rtable->rt_iif; | 575 | return skb_rtable(skb)->rt_iif; |
576 | } | 576 | } |
577 | 577 | ||
578 | /* Was this packet marked by Explicit Congestion Notification? */ | 578 | /* Was this packet marked by Explicit Congestion Notification? */ |
@@ -848,8 +848,8 @@ static inline int sctp_v4_xmit(struct sk_buff *skb, | |||
848 | 848 | ||
849 | SCTP_DEBUG_PRINTK("%s: skb:%p, len:%d, src:%pI4, dst:%pI4\n", | 849 | SCTP_DEBUG_PRINTK("%s: skb:%p, len:%d, src:%pI4, dst:%pI4\n", |
850 | __func__, skb, skb->len, | 850 | __func__, skb, skb->len, |
851 | &skb->rtable->rt_src, | 851 | &skb_rtable(skb)->rt_src, |
852 | &skb->rtable->rt_dst); | 852 | &skb_rtable(skb)->rt_dst); |
853 | 853 | ||
854 | inet->pmtudisc = transport->param_flags & SPP_PMTUD_ENABLE ? | 854 | inet->pmtudisc = transport->param_flags & SPP_PMTUD_ENABLE ? |
855 | IP_PMTUDISC_DO : IP_PMTUDISC_DONT; | 855 | IP_PMTUDISC_DO : IP_PMTUDISC_DONT; |