diff options
-rw-r--r-- | include/net/dst.h | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_input.c | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/include/net/dst.h b/include/net/dst.h index 39c4a5963e12..387cb3cfde7e 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -113,7 +113,7 @@ dst_metric(const struct dst_entry *dst, int metric) | |||
113 | static inline u32 | 113 | static inline u32 |
114 | dst_feature(const struct dst_entry *dst, u32 feature) | 114 | dst_feature(const struct dst_entry *dst, u32 feature) |
115 | { | 115 | { |
116 | return dst_metric(dst, RTAX_FEATURES) & feature; | 116 | return (dst ? dst_metric(dst, RTAX_FEATURES) & feature : 0); |
117 | } | 117 | } |
118 | 118 | ||
119 | static inline u32 dst_mtu(const struct dst_entry *dst) | 119 | static inline u32 dst_mtu(const struct dst_entry *dst) |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index ba0eab65fe80..be0c5bf7bfca 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -3704,8 +3704,6 @@ void tcp_parse_options(struct sk_buff *skb, struct tcp_options_received *opt_rx, | |||
3704 | struct tcphdr *th = tcp_hdr(skb); | 3704 | struct tcphdr *th = tcp_hdr(skb); |
3705 | int length = (th->doff * 4) - sizeof(struct tcphdr); | 3705 | int length = (th->doff * 4) - sizeof(struct tcphdr); |
3706 | 3706 | ||
3707 | BUG_ON(!estab && !dst); | ||
3708 | |||
3709 | ptr = (unsigned char *)(th + 1); | 3707 | ptr = (unsigned char *)(th + 1); |
3710 | opt_rx->saw_tstamp = 0; | 3708 | opt_rx->saw_tstamp = 0; |
3711 | 3709 | ||