diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2021-10-10 01:36:47 +0200 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2021-10-10 01:36:47 +0200 |
commit | 44076f4dc784686074adcdeb4f3e7390e1066350 (patch) | |
tree | 323a03dd44fb183beaf12e0f236a7f202bdb0888 /ospfd/ospf_packet.c | |
parent | Merge pull request #9760 from mobash-rasool/ospfv2-bug-fixes-02 (diff) | |
download | frr-44076f4dc784686074adcdeb4f3e7390e1066350.tar.xz frr-44076f4dc784686074adcdeb4f3e7390e1066350.zip |
ospfd: use ospf_get_name() wherever possible
Small cleanup to reduce code duplication.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ospfd/ospf_packet.c')
-rw-r--r-- | ospfd/ospf_packet.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index 1dcf93dcd..23817d2ea 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -1378,8 +1378,7 @@ static void ospf_db_desc(struct ip *iph, struct ospf_header *ospfh, if (CHECK_FLAG(oi->ospf->config, OSPF_LOG_ADJACENCY_DETAIL)) zlog_info( "%s:Packet[DD]: Neighbor %pI4 state is %s, seq_num:0x%x, local:0x%x", - (oi->ospf->name) ? oi->ospf->name : VRF_DEFAULT_NAME, - &nbr->router_id, + ospf_get_name(oi->ospf), &nbr->router_id, lookup_msg(ospf_nsm_state_msg, nbr->state, NULL), ntohl(dd->dd_seqnum), nbr->dd_seqnum); @@ -3879,9 +3878,8 @@ void ospf_db_desc_send(struct ospf_neighbor *nbr) if (CHECK_FLAG(oi->ospf->config, OSPF_LOG_ADJACENCY_DETAIL)) zlog_info( "%s:Packet[DD]: %pI4 DB Desc send with seqnum:%x , flags:%x", - (oi->ospf->name) ? oi->ospf->name : VRF_DEFAULT_NAME, - &nbr->router_id, nbr->dd_seqnum, - nbr->dd_flags); + ospf_get_name(oi->ospf), &nbr->router_id, + nbr->dd_seqnum, nbr->dd_flags); } /* Re-send Database Description. */ @@ -3899,9 +3897,8 @@ void ospf_db_desc_resend(struct ospf_neighbor *nbr) if (CHECK_FLAG(oi->ospf->config, OSPF_LOG_ADJACENCY_DETAIL)) zlog_info( "%s:Packet[DD]: %pI4 DB Desc resend with seqnum:%x , flags:%x", - (oi->ospf->name) ? oi->ospf->name : VRF_DEFAULT_NAME, - &nbr->router_id, nbr->dd_seqnum, - nbr->dd_flags); + ospf_get_name(oi->ospf), &nbr->router_id, + nbr->dd_seqnum, nbr->dd_flags); } /* Send Link State Request. */ |