route.c (b339a47c370ec669f789c5989f54eec1d78574bb) | route.c (3bd653c8455bc7991bae77968702b31c8f5df883) |
---|---|
1/* 2 * Linux INET6 implementation 3 * FIB front-end. 4 * 5 * Authors: 6 * Pedro Roque <roque@di.fc.ul.pt> 7 * 8 * This program is free software; you can redistribute it and/or --- 1819 unchanged lines hidden (view full) --- 1828 1829/* 1830 * Drop the packet on the floor 1831 */ 1832 1833static int ip6_pkt_drop(struct sk_buff *skb, int code, int ipstats_mib_noroutes) 1834{ 1835 int type; | 1/* 2 * Linux INET6 implementation 3 * FIB front-end. 4 * 5 * Authors: 6 * Pedro Roque <roque@di.fc.ul.pt> 7 * 8 * This program is free software; you can redistribute it and/or --- 1819 unchanged lines hidden (view full) --- 1828 1829/* 1830 * Drop the packet on the floor 1831 */ 1832 1833static int ip6_pkt_drop(struct sk_buff *skb, int code, int ipstats_mib_noroutes) 1834{ 1835 int type; |
1836 struct dst_entry *dst = skb->dst; |
|
1836 switch (ipstats_mib_noroutes) { 1837 case IPSTATS_MIB_INNOROUTES: 1838 type = ipv6_addr_type(&ipv6_hdr(skb)->daddr); 1839 if (type == IPV6_ADDR_ANY || type == IPV6_ADDR_RESERVED) { | 1837 switch (ipstats_mib_noroutes) { 1838 case IPSTATS_MIB_INNOROUTES: 1839 type = ipv6_addr_type(&ipv6_hdr(skb)->daddr); 1840 if (type == IPV6_ADDR_ANY || type == IPV6_ADDR_RESERVED) { |
1840 IP6_INC_STATS(ip6_dst_idev(skb->dst), IPSTATS_MIB_INADDRERRORS); | 1841 IP6_INC_STATS(dev_net(dst->dev), ip6_dst_idev(dst), 1842 IPSTATS_MIB_INADDRERRORS); |
1841 break; 1842 } 1843 /* FALLTHROUGH */ 1844 case IPSTATS_MIB_OUTNOROUTES: | 1843 break; 1844 } 1845 /* FALLTHROUGH */ 1846 case IPSTATS_MIB_OUTNOROUTES: |
1845 IP6_INC_STATS(ip6_dst_idev(skb->dst), ipstats_mib_noroutes); | 1847 IP6_INC_STATS(dev_net(dst->dev), ip6_dst_idev(dst), 1848 ipstats_mib_noroutes); |
1846 break; 1847 } 1848 icmpv6_send(skb, ICMPV6_DEST_UNREACH, code, 0, skb->dev); 1849 kfree_skb(skb); 1850 return 0; 1851} 1852 1853static int ip6_pkt_discard(struct sk_buff *skb) --- 927 unchanged lines hidden --- | 1849 break; 1850 } 1851 icmpv6_send(skb, ICMPV6_DEST_UNREACH, code, 0, skb->dev); 1852 kfree_skb(skb); 1853 return 0; 1854} 1855 1856static int ip6_pkt_discard(struct sk_buff *skb) --- 927 unchanged lines hidden --- |