summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Boutier <boutier@pps.jussieu.fr>2012-01-28 00:07:14 +0100
committerPaul Jakma <paul@quagga.net>2012-03-25 17:06:53 +0100
commit210f6f66287c40f247c1a4ff983aae85b9e42e2c (patch)
tree37b63e1cffca96ba3f069f777b89f5f18284a523
parenta0edef1b74bc9785b2aa1ed292a2777b6a75d40e (diff)
babeld: fix eui64 features.
We are interested by eui64 with at least 6 octets.
-rw-r--r--babeld/babel_main.c4
-rw-r--r--babeld/kernel_zebra.c5
2 files changed, 3 insertions, 6 deletions
diff --git a/babeld/babel_main.c b/babeld/babel_main.c
index 4d6f60eb..c039c880 100644
--- a/babeld/babel_main.c
+++ b/babeld/babel_main.c
@@ -423,7 +423,9 @@ babel_load_state_file(void)
if(memcmp(sid, myid, 8) == 0)
myseqno = seqno_plus(s, 1);
else
- zlog_err("ID mismatch in babel-state.");
+ zlog_err("ID mismatch in babel-state. id=%s; old=%s",
+ format_eui64(myid),
+ format_eui64(sid));
/* Convert realtime into monotonic time. */
if(t >= 1176800000L && t <= realnow.tv_sec)
reboot_time = babel_now.tv_sec - (realnow.tv_sec - t);
diff --git a/babeld/kernel_zebra.c b/babeld/kernel_zebra.c
index d556a605..97b7c584 100644
--- a/babeld/kernel_zebra.c
+++ b/babeld/kernel_zebra.c
@@ -371,11 +371,6 @@ if_eui64(char *ifname, int ifindex, unsigned char *eui)
eui[3] = 0xFF;
eui[4] = 0xFE;
memcpy(eui+5, tmp+3, 3);
- } else if (len > 8) {
- memcpy(eui, tmp, 8);
- } else if (len > 0){
- memset(eui, 0, 8 - len);
- memcpy(eui + 8 - len, tmp, len);
} else {
return -1;
}