summaryrefslogtreecommitdiffstats
path: root/nhrpd
diff options
context:
space:
mode:
Diffstat (limited to 'nhrpd')
-rw-r--r--nhrpd/nhrp_peer.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/nhrpd/nhrp_peer.c b/nhrpd/nhrp_peer.c
index ac64b791f..3395a685e 100644
--- a/nhrpd/nhrp_peer.c
+++ b/nhrpd/nhrp_peer.c
@@ -569,20 +569,18 @@ static void nhrp_handle_resolution_req(struct nhrp_packet_parser *pp)
while ((ext = nhrp_ext_pull(&pp->extensions, &payload)) != NULL) {
switch (htons(ext->type) & ~NHRP_EXTENSION_FLAG_COMPULSORY) {
case NHRP_EXTENSION_NAT_ADDRESS:
-
- if (sockunion_family(&nifp->nat_nbma) == AF_UNSPEC)
- break;
-
ext = nhrp_ext_push(zb, hdr,
NHRP_EXTENSION_NAT_ADDRESS);
if (!ext)
goto err;
- cie = nhrp_cie_push(zb, NHRP_CODE_SUCCESS,
+ if (sockunion_family(&nifp->nat_nbma) != AF_UNSPEC) {
+ cie = nhrp_cie_push(zb, NHRP_CODE_SUCCESS,
&nifp->nat_nbma, &pp->if_ad->addr);
- if (!cie)
- goto err;
- cie->mtu = htons(pp->if_ad->mtu);
- nhrp_ext_complete(zb, ext);
+ if (!cie)
+ goto err;
+ cie->mtu = htons(pp->if_ad->mtu);
+ nhrp_ext_complete(zb, ext);
+ }
break;
default:
if (nhrp_ext_reply(zb, hdr, ifp, ext, &payload) < 0)