/net/ipv4/ |
D | gre_demux.c | 60 int gre_parse_header(struct sk_buff *skb, struct tnl_ptk_info *tpi, in gre_parse_header() argument 74 tpi->flags = gre_flags_to_tnl_flags(greh->flags); in gre_parse_header() 75 hdr_len = gre_calc_hlen(tpi->flags); in gre_parse_header() 81 tpi->proto = greh->protocol; in gre_parse_header() 97 tpi->key = *options; in gre_parse_header() 100 tpi->key = 0; in gre_parse_header() 103 tpi->seq = *options; in gre_parse_header() 106 tpi->seq = 0; in gre_parse_header() 112 if (greh->flags == 0 && tpi->proto == htons(ETH_P_WCCP)) { in gre_parse_header() 113 tpi->proto = proto; in gre_parse_header() [all …]
|
D | ip_gre.c | 120 const struct tnl_ptk_info *tpi) in ipgre_err() argument 144 if (tpi->proto == htons(ETH_P_TEB)) in ipgre_err() 146 else if (tpi->proto == htons(ETH_P_ERSPAN) || in ipgre_err() 147 tpi->proto == htons(ETH_P_ERSPAN2)) in ipgre_err() 153 t = ip_tunnel_lookup(itn, skb->dev->ifindex, tpi->flags, in ipgre_err() 154 iph->daddr, iph->saddr, tpi->key); in ipgre_err() 190 if (tpi->proto == htons(ETH_P_IPV6) && in ipgre_err() 191 !ip6_err_gen_icmpv6_unreach(skb, iph->ihl * 4 + tpi->hdr_len, in ipgre_err() 231 struct tnl_ptk_info tpi; in gre_err() local 233 if (gre_parse_header(skb, &tpi, NULL, htons(ETH_P_IP), in gre_err() [all …]
|
D | ipip.c | 224 const struct tnl_ptk_info *tpi; in ipip_tunnel_rcv() local 234 tpi = &mplsip_tpi; in ipip_tunnel_rcv() 237 tpi = &ipip_tpi; in ipip_tunnel_rcv() 238 if (iptunnel_pull_header(skb, 0, tpi->proto, false)) in ipip_tunnel_rcv() 245 return ip_tunnel_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error); in ipip_tunnel_rcv()
|
D | ip_tunnel.c | 362 const struct tnl_ptk_info *tpi, struct metadata_dst *tun_dst, in ip_tunnel_rcv() argument 376 if ((!(tpi->flags&TUNNEL_CSUM) && (tunnel->parms.i_flags&TUNNEL_CSUM)) || in ip_tunnel_rcv() 377 ((tpi->flags&TUNNEL_CSUM) && !(tunnel->parms.i_flags&TUNNEL_CSUM))) { in ip_tunnel_rcv() 384 if (!(tpi->flags&TUNNEL_SEQ) || in ip_tunnel_rcv() 385 (tunnel->i_seqno && (s32)(ntohl(tpi->seq) - tunnel->i_seqno) < 0)) { in ip_tunnel_rcv() 390 tunnel->i_seqno = ntohl(tpi->seq) + 1; in ip_tunnel_rcv()
|
/net/ipv6/ |
D | ip6_gre.c | 426 struct tnl_ptk_info tpi; in ip6gre_err() local 429 if (gre_parse_header(skb, &tpi, NULL, htons(ETH_P_IPV6), in ip6gre_err() 435 tpi.key, tpi.proto); in ip6gre_err() 489 static int ip6gre_rcv(struct sk_buff *skb, const struct tnl_ptk_info *tpi) in ip6gre_rcv() argument 496 &ipv6h->saddr, &ipv6h->daddr, tpi->key, in ip6gre_rcv() 497 tpi->proto); in ip6gre_rcv() 504 flags = tpi->flags; in ip6gre_rcv() 505 tun_id = key32_to_tunnel_id(tpi->key); in ip6gre_rcv() 511 ip6_tnl_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error); in ip6gre_rcv() 513 ip6_tnl_rcv(tunnel, skb, tpi, NULL, log_ecn_error); in ip6gre_rcv() [all …]
|
D | ip6_tunnel.c | 771 const struct tnl_ptk_info *tpi, in __ip6_tnl_rcv() argument 782 if ((!(tpi->flags & TUNNEL_CSUM) && in __ip6_tnl_rcv() 784 ((tpi->flags & TUNNEL_CSUM) && in __ip6_tnl_rcv() 792 if (!(tpi->flags & TUNNEL_SEQ) || in __ip6_tnl_rcv() 794 (s32)(ntohl(tpi->seq) - tunnel->i_seqno) < 0)) { in __ip6_tnl_rcv() 799 tunnel->i_seqno = ntohl(tpi->seq) + 1; in __ip6_tnl_rcv() 802 skb->protocol = tpi->proto; in __ip6_tnl_rcv() 859 const struct tnl_ptk_info *tpi, in ip6_tnl_rcv() argument 863 return __ip6_tnl_rcv(t, skb, tpi, tun_dst, ip6ip6_dscp_ecn_decapsulate, in ip6_tnl_rcv() 879 const struct tnl_ptk_info *tpi, in ipxip6_rcv() argument [all …]
|
D | sit.c | 726 const struct tnl_ptk_info *tpi; in sit_tunnel_rcv() local 736 tpi = &mplsip_tpi; in sit_tunnel_rcv() 739 tpi = &ipip_tpi; in sit_tunnel_rcv() 740 if (iptunnel_pull_header(skb, 0, tpi->proto, false)) in sit_tunnel_rcv() 742 return ip_tunnel_rcv(tunnel, skb, tpi, NULL, log_ecn_error); in sit_tunnel_rcv()
|