X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fipsec%2Fipsec_tun.c;fp=src%2Fvnet%2Fipsec%2Fipsec_tun.c;h=1a9a25783aea41c463e3141237137559ed514661;hb=ac55a722d67c7354f2ab877ff79309027f7ac3ca;hp=58f9efefdc4bc991a69c40b5c88db05f2e2459f2;hpb=adf1497ee0eef85c6ecb44802ba7397d9dd67a59;p=vpp.git diff --git a/src/vnet/ipsec/ipsec_tun.c b/src/vnet/ipsec/ipsec_tun.c index 58f9efefdc4..1a9a25783ae 100644 --- a/src/vnet/ipsec/ipsec_tun.c +++ b/src/vnet/ipsec/ipsec_tun.c @@ -569,6 +569,9 @@ ipsec_tun_protect_update (u32 sw_if_index, ipsec_main_t *im; int rv; + if (NULL == nh) + nh = &IP_ADDR_ALL_0; + ITP_DBG2 ("update: %U/%U", format_vnet_sw_if_index_name, vnet_get_main (), sw_if_index, format_ip_address, nh); @@ -581,8 +584,6 @@ ipsec_tun_protect_update (u32 sw_if_index, rv = 0; im = &ipsec_main; - if (NULL == nh) - nh = &IP_ADDR_ALL_0; itpi = ipsec_tun_protect_find (sw_if_index, nh); vec_foreach_index (ii, sas_in)