mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 09:41:54 +00:00
Code clean up.
This commit is contained in:
parent
e8bf6c0766
commit
7048461df1
@ -335,7 +335,6 @@ krt_read_rt(struct ks_msg *msg, struct krt_proto *p, int scan)
|
|||||||
|
|
||||||
a.dest = RTD_NONE;
|
a.dest = RTD_NONE;
|
||||||
|
|
||||||
|
|
||||||
if (flags & RTF_GATEWAY)
|
if (flags & RTF_GATEWAY)
|
||||||
{
|
{
|
||||||
neighbor *ng = neigh_find(&p->p, &igate, 0);
|
neighbor *ng = neigh_find(&p->p, &igate, 0);
|
||||||
@ -376,8 +375,6 @@ krt_read_rt(struct ks_msg *msg, struct krt_proto *p, int scan)
|
|||||||
|
|
||||||
src = KRT_SRC_UNKNOWN; /* FIXME */
|
src = KRT_SRC_UNKNOWN; /* FIXME */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
e = rte_get_temp(&a);
|
e = rte_get_temp(&a);
|
||||||
e->net = net;
|
e->net = net;
|
||||||
e->u.krt.src = src;
|
e->u.krt.src = src;
|
||||||
@ -443,10 +440,7 @@ krt_read_ifinfo(struct ks_msg *msg)
|
|||||||
f.flags = 0;
|
f.flags = 0;
|
||||||
|
|
||||||
if (fl & IFF_UP)
|
if (fl & IFF_UP)
|
||||||
{
|
|
||||||
//f.flags |= IF_UP; /* FIXME */
|
|
||||||
f.flags |= IF_LINK_UP;
|
f.flags |= IF_LINK_UP;
|
||||||
}
|
|
||||||
if (fl & IFF_LOOPBACK) /* Loopback */
|
if (fl & IFF_LOOPBACK) /* Loopback */
|
||||||
f.flags |= IF_MULTIACCESS | IF_LOOPBACK | IF_IGNORE;
|
f.flags |= IF_MULTIACCESS | IF_LOOPBACK | IF_IGNORE;
|
||||||
else if (fl & IFF_POINTOPOINT) /* PtP */
|
else if (fl & IFF_POINTOPOINT) /* PtP */
|
||||||
@ -538,26 +532,21 @@ krt_read_msg(struct proto *p, struct ks_msg *msg, int scan)
|
|||||||
if(!scan) return;
|
if(!scan) return;
|
||||||
case RTM_ADD:
|
case RTM_ADD:
|
||||||
case RTM_DELETE:
|
case RTM_DELETE:
|
||||||
//log("KRT_ADD/DELETE");
|
|
||||||
krt_read_rt(msg, (struct krt_proto *)p, scan);
|
krt_read_rt(msg, (struct krt_proto *)p, scan);
|
||||||
break;
|
break;
|
||||||
case RTM_IFINFO:
|
case RTM_IFINFO:
|
||||||
//log("KRT_IFINFO");
|
|
||||||
krt_read_ifinfo(msg);
|
krt_read_ifinfo(msg);
|
||||||
break;
|
break;
|
||||||
case RTM_NEWADDR:
|
case RTM_NEWADDR:
|
||||||
case RTM_DELADDR:
|
case RTM_DELADDR:
|
||||||
//log("KRT_NEWADDR/DELADDR");
|
|
||||||
krt_read_addr(msg);
|
krt_read_addr(msg);
|
||||||
break;
|
break;
|
||||||
#ifdef RTM_IFANNOUNCE
|
#ifdef RTM_IFANNOUNCE
|
||||||
case RTM_IFANNOUNCE:
|
case RTM_IFANNOUNCE: /* FIXME: We should handle it */
|
||||||
log("KRT_IFANNOUNCE");
|
|
||||||
//ifan_read (&buf.ian.ifan);
|
|
||||||
break;
|
break;
|
||||||
#endif /* RTM_IFANNOUNCE */
|
#endif /* RTM_IFANNOUNCE */
|
||||||
default:
|
default:
|
||||||
log("Unprocessed RTM_type: %d", msg->rtm.rtm_type);
|
log(L_ERR "Unprocessed RTM_type: %d", msg->rtm.rtm_type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user