Lines Matching refs:t
144 struct ip_tunnel *t; in ipgre_err() local
155 t = ip_tunnel_lookup(itn, skb->dev->ifindex, tpi->flags, in ipgre_err()
158 if (!t) in ipgre_err()
198 if (t->parms.iph.daddr == 0 || in ipgre_err()
199 ipv4_is_multicast(t->parms.iph.daddr)) in ipgre_err()
202 if (t->parms.iph.ttl == 0 && type == ICMP_TIME_EXCEEDED) in ipgre_err()
205 if (time_before(jiffies, t->err_time + IPTUNNEL_ERR_TIMEO)) in ipgre_err()
206 t->err_count++; in ipgre_err()
208 t->err_count = 1; in ipgre_err()
209 t->err_time = jiffies; in ipgre_err()
809 struct ip_tunnel *t = netdev_priv(dev); in ipgre_tunnel_ctl() local
811 t->parms.i_flags = p->i_flags; in ipgre_tunnel_ctl()
812 t->parms.o_flags = p->o_flags; in ipgre_tunnel_ctl()
854 struct ip_tunnel *t = netdev_priv(dev); in ipgre_header() local
858 iph = skb_push(skb, t->hlen + sizeof(*iph)); in ipgre_header()
860 greh->flags = gre_tnl_flags_to_gre_flags(t->parms.o_flags); in ipgre_header()
863 memcpy(iph, &t->parms.iph, sizeof(struct iphdr)); in ipgre_header()
871 return t->hlen + sizeof(*iph); in ipgre_header()
873 return -(t->hlen + sizeof(*iph)); in ipgre_header()
891 struct ip_tunnel *t = netdev_priv(dev); in ipgre_open() local
893 if (ipv4_is_multicast(t->parms.iph.daddr)) { in ipgre_open()
897 rt = ip_route_output_gre(t->net, &fl4, in ipgre_open()
898 t->parms.iph.daddr, in ipgre_open()
899 t->parms.iph.saddr, in ipgre_open()
900 t->parms.o_key, in ipgre_open()
901 RT_TOS(t->parms.iph.tos), in ipgre_open()
902 t->parms.link); in ipgre_open()
909 t->mlink = dev->ifindex; in ipgre_open()
910 ip_mc_inc_group(__in_dev_get_rtnl(dev), t->parms.iph.daddr); in ipgre_open()
917 struct ip_tunnel *t = netdev_priv(dev); in ipgre_close() local
919 if (ipv4_is_multicast(t->parms.iph.daddr) && t->mlink) { in ipgre_close()
921 in_dev = inetdev_by_index(t->net, t->mlink); in ipgre_close()
923 ip_mc_dec_group(in_dev, t->parms.iph.daddr); in ipgre_close()
1139 struct ip_tunnel *t = netdev_priv(dev); in ipgre_netlink_parms() local
1176 if (t->ignore_df) in ipgre_netlink_parms()
1182 t->collect_md = true; in ipgre_netlink_parms()
1191 t->ignore_df = !!nla_get_u8(data[IFLA_GRE_IGNORE_DF]); in ipgre_netlink_parms()
1206 struct ip_tunnel *t = netdev_priv(dev); in erspan_netlink_parms() local
1216 t->erspan_ver = nla_get_u8(data[IFLA_GRE_ERSPAN_VER]); in erspan_netlink_parms()
1218 if (t->erspan_ver > 2) in erspan_netlink_parms()
1222 if (t->erspan_ver == 1) { in erspan_netlink_parms()
1224 t->index = nla_get_u32(data[IFLA_GRE_ERSPAN_INDEX]); in erspan_netlink_parms()
1225 if (t->index & ~INDEX_MASK) in erspan_netlink_parms()
1228 } else if (t->erspan_ver == 2) { in erspan_netlink_parms()
1230 t->dir = nla_get_u8(data[IFLA_GRE_ERSPAN_DIR]); in erspan_netlink_parms()
1231 if (t->dir & ~(DIR_MASK >> DIR_OFFSET)) in erspan_netlink_parms()
1235 t->hwid = nla_get_u16(data[IFLA_GRE_ERSPAN_HWID]); in erspan_netlink_parms()
1236 if (t->hwid & ~(HWID_MASK >> HWID_OFFSET)) in erspan_netlink_parms()
1348 struct ip_tunnel *t = netdev_priv(dev); in ipgre_newlink_encap_setup() local
1349 int err = ip_tunnel_encap_setup(t, &ipencap); in ipgre_newlink_encap_setup()
1398 struct ip_tunnel *t = netdev_priv(dev); in ipgre_changelink() local
1399 __u32 fwmark = t->fwmark; in ipgre_changelink()
1415 t->parms.i_flags = p.i_flags; in ipgre_changelink()
1416 t->parms.o_flags = p.o_flags; in ipgre_changelink()
1427 struct ip_tunnel *t = netdev_priv(dev); in erspan_changelink() local
1428 __u32 fwmark = t->fwmark; in erspan_changelink()
1444 t->parms.i_flags = p.i_flags; in erspan_changelink()
1445 t->parms.o_flags = p.o_flags; in erspan_changelink()
1500 struct ip_tunnel *t = netdev_priv(dev); in ipgre_fill_info() local
1501 struct ip_tunnel_parm *p = &t->parms; in ipgre_fill_info()
1517 nla_put_u32(skb, IFLA_GRE_FWMARK, t->fwmark)) in ipgre_fill_info()
1521 t->encap.type) || in ipgre_fill_info()
1523 t->encap.sport) || in ipgre_fill_info()
1525 t->encap.dport) || in ipgre_fill_info()
1527 t->encap.flags)) in ipgre_fill_info()
1530 if (nla_put_u8(skb, IFLA_GRE_IGNORE_DF, t->ignore_df)) in ipgre_fill_info()
1533 if (t->collect_md) { in ipgre_fill_info()
1546 struct ip_tunnel *t = netdev_priv(dev); in erspan_fill_info() local
1548 if (t->erspan_ver <= 2) { in erspan_fill_info()
1549 if (t->erspan_ver != 0 && !t->collect_md) in erspan_fill_info()
1550 t->parms.o_flags |= TUNNEL_KEY; in erspan_fill_info()
1552 if (nla_put_u8(skb, IFLA_GRE_ERSPAN_VER, t->erspan_ver)) in erspan_fill_info()
1555 if (t->erspan_ver == 1) { in erspan_fill_info()
1556 if (nla_put_u32(skb, IFLA_GRE_ERSPAN_INDEX, t->index)) in erspan_fill_info()
1558 } else if (t->erspan_ver == 2) { in erspan_fill_info()
1559 if (nla_put_u8(skb, IFLA_GRE_ERSPAN_DIR, t->dir)) in erspan_fill_info()
1561 if (nla_put_u16(skb, IFLA_GRE_ERSPAN_HWID, t->hwid)) in erspan_fill_info()
1574 struct ip_tunnel *t = netdev_priv(dev); in erspan_setup() local
1582 t->erspan_ver = 1; in erspan_setup()
1660 struct ip_tunnel *t; in gretap_fb_dev_create() local
1671 t = netdev_priv(dev); in gretap_fb_dev_create()
1672 t->collect_md = true; in gretap_fb_dev_create()