File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -263,19 +263,19 @@ static inline bool ipv6_anycast_destination(const struct dst_entry *dst,
263
263
int ip6_fragment (struct net * net , struct sock * sk , struct sk_buff * skb ,
264
264
int (* output )(struct net * , struct sock * , struct sk_buff * ));
265
265
266
- static inline unsigned int ip6_skb_dst_mtu (struct sk_buff * skb )
266
+ static inline unsigned int ip6_skb_dst_mtu (const struct sk_buff * skb )
267
267
{
268
- unsigned int mtu ;
269
-
270
- struct ipv6_pinfo * np = skb -> sk && !dev_recursion_level () ?
268
+ const struct ipv6_pinfo * np = skb -> sk && !dev_recursion_level () ?
271
269
inet6_sk (skb -> sk ) : NULL ;
270
+ const struct dst_entry * dst = skb_dst (skb );
271
+ unsigned int mtu ;
272
272
273
273
if (np && np -> pmtudisc >= IPV6_PMTUDISC_PROBE ) {
274
- mtu = READ_ONCE (skb_dst ( skb ) -> dev -> mtu );
275
- mtu -= lwtunnel_headroom (skb_dst ( skb ) -> lwtstate , mtu );
276
- } else
277
- mtu = dst_mtu (skb_dst ( skb ) );
278
-
274
+ mtu = READ_ONCE (dst -> dev -> mtu );
275
+ mtu -= lwtunnel_headroom (dst -> lwtstate , mtu );
276
+ } else {
277
+ mtu = dst_mtu (dst );
278
+ }
279
279
return mtu ;
280
280
}
281
281
You can’t perform that action at this time.
0 commit comments