diff options
author | Martin Mares <mj@ucw.cz> | 1999-04-14 13:09:55 +0200 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 1999-04-14 13:09:55 +0200 |
commit | 9da4d143402efd16bec286e3723b42386b20968b (patch) | |
tree | f21f2d7ced189a014c14e4b80b7e24ecaae4b8fb /proto | |
parent | 1ab4dee0288e4ad6c8fbefae3aa64ca873cf4500 (diff) | |
download | bird-9da4d143402efd16bec286e3723b42386b20968b.tar bird-9da4d143402efd16bec286e3723b42386b20968b.zip |
A couple of OSPF fixes:
o ((flags & IF_CHANGE_UP) == IF_CHANGE_UP) -> (flags & IF_CHANGE_UP)
o bcopy -> memcpy (bcopy is unportable)
o Ifdeffed out add_tail(&(ifa->sk_list),NODE mcsk) -- the node in socket
structure is for internal use by the resource manager only. (Now, the
debugging dump of open sockets looks sane :-)).
Diffstat (limited to 'proto')
-rw-r--r-- | proto/ospf/ospf.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c index 0569af9..c0dc2da 100644 --- a/proto/ospf/ospf.c +++ b/proto/ospf/ospf.c @@ -185,23 +185,25 @@ ospf_if_notify(struct proto *p, unsigned flags, struct iface *new, struct iface DBG(" OSPF: If notify called\n"); - if(((flags & IF_CHANGE_UP)==IF_CHANGE_UP) && is_good_iface(p, new)) + if((flags & IF_CHANGE_UP) && is_good_iface(p, new)) { debug(" OSPF: using interface %s.\n", new->name); /* FIXME: Latter I'll use config - this is incorrect */ ifa=mb_alloc(p->pool, sizeof(struct ospf_iface)); - bcopy(new, ifa, sizeof(struct ospf_iface)); + memcpy(ifa, new, sizeof(struct ospf_iface)); add_tail(&((struct proto_ospf *)p)->iface_list, NODE ifa); ospf_iface_default(ifa); add_wait_timer(ifa,p->pool,0); init_list(&(ifa->sk_list)); if((mcsk=ospf_open_socket(p, ifa))!=NULL) { +#if 0 /* FIXME: You cannot do this: the socket nodes are used internally by the resource manager */ add_tail(&(ifa->sk_list),NODE mcsk); +#endif } } - if((flags & IF_CHANGE_DOWN)==IF_CHANGE_DOWN) + if(flags & IF_CHANGE_DOWN) { if((ifa=find_iface((struct proto_ospf *)p, old))!=NULL) { @@ -209,7 +211,7 @@ ospf_if_notify(struct proto *p, unsigned flags, struct iface *new, struct iface } } - if((flags & IF_CHANGE_MTU)==IF_CHANGE_MTU) + if(flags & IF_CHANGE_MTU) { if((ifa=find_iface((struct proto_ospf *)p, old))!=NULL) { |