Commit e2baa57e authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Tweak some debugging messages.

parent 16ae1f9d
...@@ -150,12 +150,12 @@ parse_update_subtlv(struct interface *ifp, int metric, ...@@ -150,12 +150,12 @@ parse_update_subtlv(struct interface *ifp, int metric,
} }
if(i + 1 > alen) { if(i + 1 > alen) {
fprintf(stderr, "Received truncated attributes.\n"); fprintf(stderr, "Received truncated sub-TLV on Update.\n");
return; return;
} }
len = a[i + 1]; len = a[i + 1];
if(i + len > alen) { if(i + len > alen) {
fprintf(stderr, "Received truncated attributes.\n"); fprintf(stderr, "Received truncated sub-TLV on Update.\n");
return; return;
} }
...@@ -187,12 +187,12 @@ parse_hello_subtlv(const unsigned char *a, int alen, ...@@ -187,12 +187,12 @@ parse_hello_subtlv(const unsigned char *a, int alen,
} }
if(i + 1 > alen) { if(i + 1 > alen) {
fprintf(stderr, "Received truncated sub-TLV on Hello message.\n"); fprintf(stderr, "Received truncated sub-TLV on Hello.\n");
return -1; return -1;
} }
len = a[i + 1]; len = a[i + 1];
if(i + len > alen) { if(i + len > alen) {
fprintf(stderr, "Received truncated sub-TLV on Hello message.\n"); fprintf(stderr, "Received truncated sub-TLV on Hello.\n");
return -1; return -1;
} }
...@@ -204,7 +204,7 @@ parse_hello_subtlv(const unsigned char *a, int alen, ...@@ -204,7 +204,7 @@ parse_hello_subtlv(const unsigned char *a, int alen,
ret = 1; ret = 1;
} else { } else {
fprintf(stderr, fprintf(stderr,
"Received incorrect RTT sub-TLV on Hello message.\n"); "Received incorrect RTT sub-TLV on Hello.\n");
} }
} else { } else {
debugf("Received unknown Hello sub-TLV type %d.\n", type); debugf("Received unknown Hello sub-TLV type %d.\n", type);
...@@ -230,12 +230,12 @@ parse_ihu_subtlv(const unsigned char *a, int alen, ...@@ -230,12 +230,12 @@ parse_ihu_subtlv(const unsigned char *a, int alen,
} }
if(i + 1 > alen) { if(i + 1 > alen) {
fprintf(stderr, "Received truncated sub-TLV on IHU message.\n"); fprintf(stderr, "Received truncated sub-TLV on IHU.\n");
return -1; return -1;
} }
len = a[i + 1]; len = a[i + 1];
if(i + len > alen) { if(i + len > alen) {
fprintf(stderr, "Received truncated sub-TLV on IHU message.\n"); fprintf(stderr, "Received truncated sub-TLV on IHU.\n");
return -1; return -1;
} }
...@@ -249,7 +249,7 @@ parse_ihu_subtlv(const unsigned char *a, int alen, ...@@ -249,7 +249,7 @@ parse_ihu_subtlv(const unsigned char *a, int alen,
} }
else { else {
fprintf(stderr, fprintf(stderr,
"Received incorrect RTT sub-TLV on IHU message.\n"); "Received incorrect RTT sub-TLV on IHU.\n");
} }
} else { } else {
debugf("Received unknown IHU sub-TLV type %d.\n", type); debugf("Received unknown IHU sub-TLV type %d.\n", type);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment