diff options
-rw-r--r-- | net/netfilter/xt_TCPMSS.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/net/netfilter/xt_TCPMSS.c b/net/netfilter/xt_TCPMSS.c index eb81c380da1b..6e6b46cb1db9 100644 --- a/net/netfilter/xt_TCPMSS.c +++ b/net/netfilter/xt_TCPMSS.c | |||
@@ -148,16 +148,21 @@ tcpmss_mangle_packet(struct sk_buff *skb, | |||
148 | static u_int32_t tcpmss_reverse_mtu(const struct sk_buff *skb, | 148 | static u_int32_t tcpmss_reverse_mtu(const struct sk_buff *skb, |
149 | unsigned int family) | 149 | unsigned int family) |
150 | { | 150 | { |
151 | struct flowi fl = {}; | 151 | struct flowi fl; |
152 | const struct nf_afinfo *ai; | 152 | const struct nf_afinfo *ai; |
153 | struct rtable *rt = NULL; | 153 | struct rtable *rt = NULL; |
154 | u_int32_t mtu = ~0U; | 154 | u_int32_t mtu = ~0U; |
155 | 155 | ||
156 | if (family == PF_INET) | 156 | if (family == PF_INET) { |
157 | fl.fl4_dst = ip_hdr(skb)->saddr; | 157 | struct flowi4 *fl4 = &fl.u.ip4; |
158 | else | 158 | memset(fl4, 0, sizeof(*fl4)); |
159 | fl.fl6_dst = ipv6_hdr(skb)->saddr; | 159 | fl4->daddr = ip_hdr(skb)->saddr; |
160 | } else { | ||
161 | struct flowi6 *fl6 = &fl.u.ip6; | ||
160 | 162 | ||
163 | memset(fl6, 0, sizeof(*fl6)); | ||
164 | ipv6_addr_copy(&fl6->daddr, &ipv6_hdr(skb)->saddr); | ||
165 | } | ||
161 | rcu_read_lock(); | 166 | rcu_read_lock(); |
162 | ai = nf_get_afinfo(family); | 167 | ai = nf_get_afinfo(family); |
163 | if (ai != NULL) | 168 | if (ai != NULL) |