mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2025-01-18 06:51:54 +00:00
Minor fixme - core
This commit is contained in:
parent
5c5a1b862c
commit
1711023df2
@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
#include "nest/bird.h"
|
#include "nest/bird.h"
|
||||||
|
#include "nest/iface.h"
|
||||||
#include "lib/ip.h"
|
#include "lib/ip.h"
|
||||||
#include "lib/net.h"
|
#include "lib/net.h"
|
||||||
#include "lib/flowspec.h"
|
#include "lib/flowspec.h"
|
||||||
@ -89,6 +90,7 @@ int
|
|||||||
net_format(const net_addr *N, char *buf, int buflen)
|
net_format(const net_addr *N, char *buf, int buflen)
|
||||||
{
|
{
|
||||||
net_addr_union *n = (void *) N;
|
net_addr_union *n = (void *) N;
|
||||||
|
struct iface *ifa;
|
||||||
buf[0] = 0;
|
buf[0] = 0;
|
||||||
|
|
||||||
switch (n->n.type)
|
switch (n->n.type)
|
||||||
@ -119,9 +121,11 @@ net_format(const net_addr *N, char *buf, int buflen)
|
|||||||
case NET_FLOW6:
|
case NET_FLOW6:
|
||||||
return flow6_net_format(buf, buflen, &n->flow6);
|
return flow6_net_format(buf, buflen, &n->flow6);
|
||||||
case NET_MREQ4:
|
case NET_MREQ4:
|
||||||
return bsnprintf(buf, buflen, "%I4", n->mreq4.grp);
|
ifa = if_find_by_index(n->mreq4.ifindex);
|
||||||
|
return bsnprintf(buf, buflen, "(*, %I4, %s)", n->mreq4.grp, ifa ? ifa->name : "?");
|
||||||
case NET_MREQ6:
|
case NET_MREQ6:
|
||||||
return bsnprintf(buf, buflen, "%I6", n->mreq6.grp);
|
ifa = if_find_by_index(n->mreq6.ifindex);
|
||||||
|
return bsnprintf(buf, buflen, "(*, %I6, %s)", n->mreq6.grp, ifa ? ifa->name : "?");
|
||||||
case NET_MGRP4:
|
case NET_MGRP4:
|
||||||
return bsnprintf(buf, buflen, "(*, %I4)", n->mgrp4.grp);
|
return bsnprintf(buf, buflen, "(*, %I4)", n->mgrp4.grp);
|
||||||
case NET_MGRP6:
|
case NET_MGRP6:
|
||||||
|
Loading…
Reference in New Issue
Block a user