# \[PATCH 1/3\] ipv4: Kill spurious opt-\>srr check in ip\_options\_rcv\_srr().

- From: David Miller \<davem@davemloft.net\>
- Date: 2011-05-12 23:38:41 
- List: netdev
- Page: https://ratatoskr.run/netdev/2011/05/10871001
- Thread: https://ratatoskr.run/netdev/2011/05/10871001/t.md

```text

All call sites conditionalize the call to ip_options_rcv_srr()
with a check of opt->srr, so no need to check it again there.

Signed-off-by: David S. Miller <davem@davemloft.net>
---
 net/ipv4/ip_options.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c
index 01fc409..e82c304 100644
--- a/net/ipv4/ip_options.c
+++ b/net/ipv4/ip_options.c
@@ -601,7 +601,7 @@ int ip_options_rcv_srr(struct sk_buff *skb)
 	unsigned long orefdst;
 	int err;
 
-	if (!opt->srr || !rt)
+	if (!rt)
 		return 0;
 
 	if (skb->pkt_type != PACKET_HOST)
-- 
1.7.4.4

```
