diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2016-12-06 19:51:33 +0000 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2016-12-06 19:51:33 +0000 |
| commit | 6fd800be4ac4da8ec034f2a858e0183b8ae9bb01 (patch) | |
| tree | e1a77a68567f6496415b6476a6bed52c77d64619 /ospfd/ospf_packet.c | |
| parent | 3d6e734154e6da17423e9054b5443774cacfdd51 (diff) | |
| parent | 9dec6b446c5487623ad04fdaa8160e3338f12799 (diff) | |
Merge remote-tracking branch 'osr/master' into vtysh-grammar
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Conflicts:
lib/command_match.c
Diffstat (limited to 'ospfd/ospf_packet.c')
| -rw-r--r-- | ospfd/ospf_packet.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index b7ef24409e..72ce5586f6 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -2772,6 +2772,7 @@ ospf_read (struct thread *thread) struct ospf_header *ospfh; u_int16_t length; struct interface *ifp; + struct connected *c; /* first of all get interface pointer. */ ospf = THREAD_ARG (thread); @@ -2790,13 +2791,16 @@ ospf_read (struct thread *thread) /* Note that sockopt_iphdrincl_swab_systoh was called in ospf_recv_packet. */ if (ifp == NULL) - /* Handle cases where the platform does not support retrieving the ifindex, - and also platforms (such as Solaris 8) that claim to support ifindex - retrieval but do not. */ - ifp = if_lookup_address ((void *)&iph->ip_src, AF_INET); - - if (ifp == NULL) - return 0; + { + /* Handle cases where the platform does not support retrieving the ifindex, + and also platforms (such as Solaris 8) that claim to support ifindex + retrieval but do not. */ + c = if_lookup_address ((void *)&iph->ip_src, AF_INET); + if (c) + ifp = c->ifp; + if (ifp == NULL) + return 0; + } /* IP Header dump. */ if (IS_DEBUG_OSPF_PACKET(0, RECV)) |
