diff options
author | Ingo Flaschberger <if@xip.at> | 2011-04-17 18:28:20 +0000 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2014-03-21 06:28:23 +0100 |
commit | 1db65fadf627637621c342b789b9a3604ca5fab5 (patch) | |
tree | 546c769ca03e71e6c7bb55a52b4f7ea525542864 /ospf6d/ospf6_message.c | |
parent | e708ed69aa0b993527f48b1f31b645c00750927f (diff) | |
download | quagga-1db65fadf627637621c342b789b9a3604ca5fab5.tar.bz2 quagga-1db65fadf627637621c342b789b9a3604ca5fab5.tar.xz |
ospf6d: solve segfaults with ospf6d on FreeBSD
Do not send ospf6d hellos on fresh created interfaces without
configuration (ie. no vlan configured). Ospf6d use ip6_mtu, if it's not
initalised, Ospf6d tries to alloc indefinite size of memory.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ospf6d/ospf6_message.c')
-rw-r--r-- | ospf6d/ospf6_message.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c index 5fb5a216..0756ef34 100644 --- a/ospf6d/ospf6_message.c +++ b/ospf6d/ospf6_message.c @@ -1721,6 +1721,13 @@ ospf6_hello_send (struct thread *thread) return 0; } + if (iobuflen == 0) + { + zlog_debug ("Unable to send Hello on interface %s iobuflen is 0", + oi->interface->name); + return 0; + } + /* set next thread */ oi->thread_send_hello = thread_add_timer (master, ospf6_hello_send, oi, oi->hello_interval); |