"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "net/netfilter/nf_flow_table_ip.c" between
linux-5.2.16.tar.xz and linux-5.2.17.tar.xz

About: The full source of the Linux kernel 5.2.x (stable)

nf_flow_table_ip.c  (linux-5.2.16.tar.xz):nf_flow_table_ip.c  (linux-5.2.17.tar.xz)
skipping to change at line 231 skipping to change at line 231
return 0; return 0;
} }
static unsigned int nf_flow_xmit_xfrm(struct sk_buff *skb, static unsigned int nf_flow_xmit_xfrm(struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state,
struct dst_entry *dst) struct dst_entry *dst)
{ {
skb_orphan(skb); skb_orphan(skb);
skb_dst_set_noref(skb, dst); skb_dst_set_noref(skb, dst);
skb->tstamp = 0;
dst_output(state->net, state->sk, skb); dst_output(state->net, state->sk, skb);
return NF_STOLEN; return NF_STOLEN;
} }
unsigned int unsigned int
nf_flow_offload_ip_hook(void *priv, struct sk_buff *skb, nf_flow_offload_ip_hook(void *priv, struct sk_buff *skb,
const struct nf_hook_state *state) const struct nf_hook_state *state)
{ {
struct flow_offload_tuple_rhash *tuplehash; struct flow_offload_tuple_rhash *tuplehash;
struct nf_flowtable *flow_table = priv; struct nf_flowtable *flow_table = priv;
skipping to change at line 287 skipping to change at line 286
flow_offload_teardown(flow); flow_offload_teardown(flow);
return NF_ACCEPT; return NF_ACCEPT;
} }
if (nf_flow_nat_ip(flow, skb, thoff, dir) < 0) if (nf_flow_nat_ip(flow, skb, thoff, dir) < 0)
return NF_DROP; return NF_DROP;
flow->timeout = (u32)jiffies + NF_FLOW_TIMEOUT; flow->timeout = (u32)jiffies + NF_FLOW_TIMEOUT;
iph = ip_hdr(skb); iph = ip_hdr(skb);
ip_decrease_ttl(iph); ip_decrease_ttl(iph);
skb->tstamp = 0;
if (unlikely(dst_xfrm(&rt->dst))) { if (unlikely(dst_xfrm(&rt->dst))) {
memset(skb->cb, 0, sizeof(struct inet_skb_parm)); memset(skb->cb, 0, sizeof(struct inet_skb_parm));
IPCB(skb)->iif = skb->dev->ifindex; IPCB(skb)->iif = skb->dev->ifindex;
IPCB(skb)->flags = IPSKB_FORWARDED; IPCB(skb)->flags = IPSKB_FORWARDED;
return nf_flow_xmit_xfrm(skb, state, &rt->dst); return nf_flow_xmit_xfrm(skb, state, &rt->dst);
} }
skb->dev = outdev; skb->dev = outdev;
nexthop = rt_nexthop(rt, flow->tuplehash[!dir].tuple.src_v4.s_addr); nexthop = rt_nexthop(rt, flow->tuplehash[!dir].tuple.src_v4.s_addr);
skipping to change at line 515 skipping to change at line 515
if (skb_try_make_writable(skb, sizeof(*ip6h))) if (skb_try_make_writable(skb, sizeof(*ip6h)))
return NF_DROP; return NF_DROP;
if (nf_flow_nat_ipv6(flow, skb, dir) < 0) if (nf_flow_nat_ipv6(flow, skb, dir) < 0)
return NF_DROP; return NF_DROP;
flow->timeout = (u32)jiffies + NF_FLOW_TIMEOUT; flow->timeout = (u32)jiffies + NF_FLOW_TIMEOUT;
ip6h = ipv6_hdr(skb); ip6h = ipv6_hdr(skb);
ip6h->hop_limit--; ip6h->hop_limit--;
skb->tstamp = 0;
if (unlikely(dst_xfrm(&rt->dst))) { if (unlikely(dst_xfrm(&rt->dst))) {
memset(skb->cb, 0, sizeof(struct inet6_skb_parm)); memset(skb->cb, 0, sizeof(struct inet6_skb_parm));
IP6CB(skb)->iif = skb->dev->ifindex; IP6CB(skb)->iif = skb->dev->ifindex;
IP6CB(skb)->flags = IP6SKB_FORWARDED; IP6CB(skb)->flags = IP6SKB_FORWARDED;
return nf_flow_xmit_xfrm(skb, state, &rt->dst); return nf_flow_xmit_xfrm(skb, state, &rt->dst);
} }
skb->dev = outdev; skb->dev = outdev;
nexthop = rt6_nexthop(rt, &flow->tuplehash[!dir].tuple.src_v6); nexthop = rt6_nexthop(rt, &flow->tuplehash[!dir].tuple.src_v6);
 End of changes. 3 change blocks. 
1 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)