Commit 1ed5c48f authored by David S. Miller's avatar David S. Miller

net: Remove checks for dst_ops->redirect being NULL.

No longer necessary.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b587ee3b
...@@ -199,7 +199,7 @@ static void dccp_do_redirect(struct sk_buff *skb, struct sock *sk) ...@@ -199,7 +199,7 @@ static void dccp_do_redirect(struct sk_buff *skb, struct sock *sk)
{ {
struct dst_entry *dst = __sk_dst_check(sk, 0); struct dst_entry *dst = __sk_dst_check(sk, 0);
if (dst && dst->ops->redirect) if (dst)
dst->ops->redirect(dst, skb); dst->ops->redirect(dst, skb);
} }
......
...@@ -133,7 +133,7 @@ static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, ...@@ -133,7 +133,7 @@ static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
if (type == NDISC_REDIRECT) { if (type == NDISC_REDIRECT) {
struct dst_entry *dst = __sk_dst_check(sk, np->dst_cookie); struct dst_entry *dst = __sk_dst_check(sk, np->dst_cookie);
if (dst && dst->ops->redirect) if (dst)
dst->ops->redirect(dst, skb); dst->ops->redirect(dst, skb);
} }
......
...@@ -325,7 +325,7 @@ static void do_redirect(struct sk_buff *skb, struct sock *sk) ...@@ -325,7 +325,7 @@ static void do_redirect(struct sk_buff *skb, struct sock *sk)
{ {
struct dst_entry *dst = __sk_dst_check(sk, 0); struct dst_entry *dst = __sk_dst_check(sk, 0);
if (dst && dst->ops->redirect) if (dst)
dst->ops->redirect(dst, skb); dst->ops->redirect(dst, skb);
} }
......
...@@ -207,8 +207,7 @@ static void xfrm4_redirect(struct dst_entry *dst, struct sk_buff *skb) ...@@ -207,8 +207,7 @@ static void xfrm4_redirect(struct dst_entry *dst, struct sk_buff *skb)
struct xfrm_dst *xdst = (struct xfrm_dst *)dst; struct xfrm_dst *xdst = (struct xfrm_dst *)dst;
struct dst_entry *path = xdst->route; struct dst_entry *path = xdst->route;
if (path->ops->redirect) path->ops->redirect(path, skb);
path->ops->redirect(path, skb);
} }
static void xfrm4_dst_destroy(struct dst_entry *dst) static void xfrm4_dst_destroy(struct dst_entry *dst)
......
...@@ -611,10 +611,8 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, ...@@ -611,10 +611,8 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
skb_dst(skb2)->ops->update_pmtu(skb_dst(skb2), rel_info); skb_dst(skb2)->ops->update_pmtu(skb_dst(skb2), rel_info);
} }
if (rel_type == ICMP_REDIRECT) { if (rel_type == ICMP_REDIRECT)
if (skb_dst(skb2)->ops->redirect) skb_dst(skb2)->ops->redirect(skb_dst(skb2), skb2);
skb_dst(skb2)->ops->redirect(skb_dst(skb2), skb2);
}
icmp_send(skb2, rel_type, rel_code, htonl(rel_info)); icmp_send(skb2, rel_type, rel_code, htonl(rel_info));
......
...@@ -366,7 +366,7 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, ...@@ -366,7 +366,7 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
if (type == NDISC_REDIRECT) { if (type == NDISC_REDIRECT) {
struct dst_entry *dst = __sk_dst_check(sk, np->dst_cookie); struct dst_entry *dst = __sk_dst_check(sk, np->dst_cookie);
if (dst && dst->ops->redirect) if (dst)
dst->ops->redirect(dst,skb); dst->ops->redirect(dst,skb);
} }
......
...@@ -431,7 +431,7 @@ void sctp_icmp_redirect(struct sock *sk, struct sctp_transport *t, ...@@ -431,7 +431,7 @@ void sctp_icmp_redirect(struct sock *sk, struct sctp_transport *t,
if (!t) if (!t)
return; return;
dst = sctp_transport_dst_check(t); dst = sctp_transport_dst_check(t);
if (dst && dst->ops->redirect) if (dst)
dst->ops->redirect(dst, skb); dst->ops->redirect(dst, skb);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment