diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-06-30 15:08:53 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-06-30 15:08:53 -0400 |
| commit | f92f83be2c72c7c4a7a1214b98ddd982bb0ae222 (patch) | |
| tree | 0b0d7aca697704406d64a3c9dada24a619e42ce0 /zebra/kernel_socket.c | |
| parent | 8471aeb4f598b7368dda6bb15c2f22e33fc2fdd1 (diff) | |
| parent | 5e882cab8fc828de286f1ead04ff6d648f05d832 (diff) | |
Merge pull request #773 from qlyoung/log-fix-3.0
*: simplify log message lookup [3.0]
Diffstat (limited to 'zebra/kernel_socket.c')
| -rw-r--r-- | zebra/kernel_socket.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c index 7212ed6f26..eeccd1f175 100644 --- a/zebra/kernel_socket.c +++ b/zebra/kernel_socket.c @@ -220,7 +220,7 @@ const struct message rtm_type_str[] = #ifdef RTM_IFANNOUNCE {RTM_IFANNOUNCE, "RTM_IFANNOUNCE"}, #endif /* RTM_IFANNOUNCE */ - {0, NULL} + { 0 } }; static const struct message rtm_flag_str[] = @@ -278,7 +278,7 @@ static const struct message rtm_flag_str[] = #ifdef RTF_SETSRC {RTF_SETSRC, "SETSRC"}, #endif /* RTF_SETSRC */ - {0, NULL} + { 0 } }; /* Kernel routing update socket. */ @@ -875,7 +875,7 @@ rtm_read (struct rt_msghdr *rtm) return; if (IS_ZEBRA_DEBUG_KERNEL) zlog_debug ("%s: got rtm of type %d (%s)", __func__, rtm->rtm_type, - lookup (rtm_type_str, rtm->rtm_type)); + lookup_msg(rtm_type_str, rtm->rtm_type, NULL)); #ifdef RTF_CLONED /*bsdi, netbsd 1.6*/ if (flags & RTF_CLONED) @@ -940,17 +940,17 @@ rtm_read (struct rt_msghdr *rtm) { case ZEBRA_RIB_NOTFOUND: zlog_debug ("%s: %s %s: desync: RR isn't yet in RIB, while already in FIB", - __func__, lookup (rtm_type_str, rtm->rtm_type), buf); + __func__, lookup_msg(rtm_type_str, rtm->rtm_type, NULL), buf); break; case ZEBRA_RIB_FOUND_CONNECTED: case ZEBRA_RIB_FOUND_NOGATE: inet_ntop (AF_INET, &gate.sin.sin_addr, gate_buf, INET_ADDRSTRLEN); zlog_debug ("%s: %s %s: desync: RR is in RIB, but gate differs (ours is %s)", - __func__, lookup (rtm_type_str, rtm->rtm_type), buf, gate_buf); + __func__, lookup_msg(rtm_type_str, rtm->rtm_type, NULL), buf, gate_buf); break; case ZEBRA_RIB_FOUND_EXACT: /* RIB RR == FIB RR */ zlog_debug ("%s: %s %s: done Ok", - __func__, lookup (rtm_type_str, rtm->rtm_type), buf); + __func__, lookup_msg(rtm_type_str, rtm->rtm_type, NULL), buf); rib_lookup_and_dump ((struct prefix_ipv4 *)&p, VRF_DEFAULT); return; break; @@ -963,18 +963,18 @@ rtm_read (struct rt_msghdr *rtm) { case ZEBRA_RIB_FOUND_EXACT: zlog_debug ("%s: %s %s: desync: RR is still in RIB, while already not in FIB", - __func__, lookup (rtm_type_str, rtm->rtm_type), buf); + __func__, lookup_msg(rtm_type_str, rtm->rtm_type, NULL), buf); rib_lookup_and_dump ((struct prefix_ipv4 *)&p, VRF_DEFAULT); break; case ZEBRA_RIB_FOUND_CONNECTED: case ZEBRA_RIB_FOUND_NOGATE: zlog_debug ("%s: %s %s: desync: RR is still in RIB, plus gate differs", - __func__, lookup (rtm_type_str, rtm->rtm_type), buf); + __func__, lookup_msg(rtm_type_str, rtm->rtm_type, NULL), buf); rib_lookup_and_dump ((struct prefix_ipv4 *)&p, VRF_DEFAULT); break; case ZEBRA_RIB_NOTFOUND: /* RIB RR == FIB RR */ zlog_debug ("%s: %s %s: done Ok", - __func__, lookup (rtm_type_str, rtm->rtm_type), buf); + __func__, lookup_msg(rtm_type_str, rtm->rtm_type, NULL), buf); rib_lookup_and_dump ((struct prefix_ipv4 *)&p, VRF_DEFAULT); return; break; @@ -982,7 +982,7 @@ rtm_read (struct rt_msghdr *rtm) break; default: zlog_debug ("%s: %s: warning: loopback RTM of type %s received", - __func__, buf, lookup (rtm_type_str, rtm->rtm_type)); + __func__, buf, lookup_msg(rtm_type_str, rtm->rtm_type, NULL)); } return; } @@ -1203,7 +1203,7 @@ rtm_write (int message, static void rtmsg_debug (struct rt_msghdr *rtm) { - zlog_debug ("Kernel: Len: %d Type: %s", rtm->rtm_msglen, lookup (rtm_type_str, rtm->rtm_type)); + zlog_debug ("Kernel: Len: %d Type: %s", rtm->rtm_msglen, lookup_msg(rtm_type_str, rtm->rtm_type, NULL)); rtm_flag_dump (rtm->rtm_flags); zlog_debug ("Kernel: message seq %d", rtm->rtm_seq); zlog_debug ("Kernel: pid %lld, rtm_addrs 0x%x", |
