diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-07-30 03:13:03 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-07-30 03:13:03 -0400 |
commit | fcb06702f023a0e7b1e6ebf9746f34b610ca0508 (patch) | |
tree | db022324c4978dd9af059be38822d23455a45f55 /net/ipv4/ip_sockglue.c | |
parent | 5e31fc0815a4e2c72b1b495fe7a0d8f9bfb9e4b4 (diff) | |
parent | 9dbf5f55f8d35ff9aedc75267f4e4042aaf89755 (diff) |
Merge remote-tracking branch 'wireless/master' into mac80211
Diffstat (limited to 'net/ipv4/ip_sockglue.c')
-rw-r--r-- | net/ipv4/ip_sockglue.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c index 0d11f234d615..5eea4a811042 100644 --- a/net/ipv4/ip_sockglue.c +++ b/net/ipv4/ip_sockglue.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #if IS_ENABLED(CONFIG_IPV6) | 40 | #if IS_ENABLED(CONFIG_IPV6) |
41 | #include <net/transp_v6.h> | 41 | #include <net/transp_v6.h> |
42 | #endif | 42 | #endif |
43 | #include <net/ip_fib.h> | ||
43 | 44 | ||
44 | #include <linux/errqueue.h> | 45 | #include <linux/errqueue.h> |
45 | #include <asm/uaccess.h> | 46 | #include <asm/uaccess.h> |
@@ -1019,18 +1020,17 @@ e_inval: | |||
1019 | * @sk: socket | 1020 | * @sk: socket |
1020 | * @skb: buffer | 1021 | * @skb: buffer |
1021 | * | 1022 | * |
1022 | * To support IP_CMSG_PKTINFO option, we store rt_iif and rt_spec_dst | 1023 | * To support IP_CMSG_PKTINFO option, we store rt_iif and specific |
1023 | * in skb->cb[] before dst drop. | 1024 | * destination in skb->cb[] before dst drop. |
1024 | * This way, receiver doesnt make cache line misses to read rtable. | 1025 | * This way, receiver doesnt make cache line misses to read rtable. |
1025 | */ | 1026 | */ |
1026 | void ipv4_pktinfo_prepare(struct sk_buff *skb) | 1027 | void ipv4_pktinfo_prepare(struct sk_buff *skb) |
1027 | { | 1028 | { |
1028 | struct in_pktinfo *pktinfo = PKTINFO_SKB_CB(skb); | 1029 | struct in_pktinfo *pktinfo = PKTINFO_SKB_CB(skb); |
1029 | const struct rtable *rt = skb_rtable(skb); | ||
1030 | 1030 | ||
1031 | if (rt) { | 1031 | if (skb_rtable(skb)) { |
1032 | pktinfo->ipi_ifindex = rt->rt_iif; | 1032 | pktinfo->ipi_ifindex = inet_iif(skb); |
1033 | pktinfo->ipi_spec_dst.s_addr = rt->rt_spec_dst; | 1033 | pktinfo->ipi_spec_dst.s_addr = fib_compute_spec_dst(skb); |
1034 | } else { | 1034 | } else { |
1035 | pktinfo->ipi_ifindex = 0; | 1035 | pktinfo->ipi_ifindex = 0; |
1036 | pktinfo->ipi_spec_dst.s_addr = 0; | 1036 | pktinfo->ipi_spec_dst.s_addr = 0; |