ip6_input.c (2d8ad8719591fa803b0d589ed057fa46f49b7155) ip6_input.c (b71d1d426d263b0b6cb5760322efebbfc89d4463)
1/*
2 * IPv6 input
3 * Linux INET6 implementation
4 *
5 * Authors:
6 * Pedro Roque <roque@di.fc.ul.pt>
7 * Ian P. Morris <I.P.Morris@soton.ac.uk>
8 *

--- 43 unchanged lines hidden (view full) ---

52 if (skb_dst(skb) == NULL)
53 ip6_route_input(skb);
54
55 return dst_input(skb);
56}
57
58int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev)
59{
1/*
2 * IPv6 input
3 * Linux INET6 implementation
4 *
5 * Authors:
6 * Pedro Roque <roque@di.fc.ul.pt>
7 * Ian P. Morris <I.P.Morris@soton.ac.uk>
8 *

--- 43 unchanged lines hidden (view full) ---

52 if (skb_dst(skb) == NULL)
53 ip6_route_input(skb);
54
55 return dst_input(skb);
56}
57
58int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev)
59{
60 struct ipv6hdr *hdr;
60 const struct ipv6hdr *hdr;
61 u32 pkt_len;
62 struct inet6_dev *idev;
63 struct net *net = dev_net(skb->dev);
64
65 if (skb->pkt_type == PACKET_OTHERHOST) {
66 kfree_skb(skb);
67 return NET_RX_DROP;
68 }

--- 112 unchanged lines hidden (view full) ---

181
182 raw = raw6_local_deliver(skb, nexthdr);
183
184 hash = nexthdr & (MAX_INET_PROTOS - 1);
185 if ((ipprot = rcu_dereference(inet6_protos[hash])) != NULL) {
186 int ret;
187
188 if (ipprot->flags & INET6_PROTO_FINAL) {
61 u32 pkt_len;
62 struct inet6_dev *idev;
63 struct net *net = dev_net(skb->dev);
64
65 if (skb->pkt_type == PACKET_OTHERHOST) {
66 kfree_skb(skb);
67 return NET_RX_DROP;
68 }

--- 112 unchanged lines hidden (view full) ---

181
182 raw = raw6_local_deliver(skb, nexthdr);
183
184 hash = nexthdr & (MAX_INET_PROTOS - 1);
185 if ((ipprot = rcu_dereference(inet6_protos[hash])) != NULL) {
186 int ret;
187
188 if (ipprot->flags & INET6_PROTO_FINAL) {
189 struct ipv6hdr *hdr;
189 const struct ipv6hdr *hdr;
190
191 /* Free reference early: we don't need it any more,
192 and it may hold ip_conntrack module loaded
193 indefinitely. */
194 nf_reset(skb);
195
196 skb_postpull_rcsum(skb, skb_network_header(skb),
197 skb_network_header_len(skb));

--- 39 unchanged lines hidden (view full) ---

237int ip6_input(struct sk_buff *skb)
238{
239 return NF_HOOK(NFPROTO_IPV6, NF_INET_LOCAL_IN, skb, skb->dev, NULL,
240 ip6_input_finish);
241}
242
243int ip6_mc_input(struct sk_buff *skb)
244{
190
191 /* Free reference early: we don't need it any more,
192 and it may hold ip_conntrack module loaded
193 indefinitely. */
194 nf_reset(skb);
195
196 skb_postpull_rcsum(skb, skb_network_header(skb),
197 skb_network_header_len(skb));

--- 39 unchanged lines hidden (view full) ---

237int ip6_input(struct sk_buff *skb)
238{
239 return NF_HOOK(NFPROTO_IPV6, NF_INET_LOCAL_IN, skb, skb->dev, NULL,
240 ip6_input_finish);
241}
242
243int ip6_mc_input(struct sk_buff *skb)
244{
245 struct ipv6hdr *hdr;
245 const struct ipv6hdr *hdr;
246 int deliver;
247
248 IP6_UPD_PO_STATS_BH(dev_net(skb_dst(skb)->dev),
249 ip6_dst_idev(skb_dst(skb)), IPSTATS_MIB_INMCAST,
250 skb->len);
251
252 hdr = ipv6_hdr(skb);
253 deliver = ipv6_chk_mcast_addr(skb->dev, &hdr->daddr, NULL);

--- 82 unchanged lines hidden ---
246 int deliver;
247
248 IP6_UPD_PO_STATS_BH(dev_net(skb_dst(skb)->dev),
249 ip6_dst_idev(skb_dst(skb)), IPSTATS_MIB_INMCAST,
250 skb->len);
251
252 hdr = ipv6_hdr(skb);
253 deliver = ipv6_chk_mcast_addr(skb->dev, &hdr->daddr, NULL);

--- 82 unchanged lines hidden ---