]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Merge several fixes suggested by Joakim Tjernlund.
authorOndrej Zajicek <santiago@crfreenet.org>
Sun, 2 May 2010 20:41:40 +0000 (22:41 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Sun, 2 May 2010 20:41:40 +0000 (22:41 +0200)
conf/cf-lex.l
proto/bgp/packets.c
proto/ospf/lsalib.c
proto/ospf/lsalib.h
tools/Rules.in

index 3fe3c2e61f865316a732a6cb70c062a374c6e086..a99acdc8925e26026e5f09b3e36cb92f2f0a1f68 100644 (file)
@@ -77,6 +77,9 @@ int (*cf_read_hook)(byte *buf, unsigned int max);
 %}
 
 %option noyywrap
+%option noinput
+%option nounput
+%option noreject
 
 %x COMMENT CCOMM CLI
 
@@ -110,7 +113,7 @@ WHITE [ \t]
 #endif
 }
 
-0x{DIGIT}+ {
+0x{XIGIT}+ {
   char *e;
   long int l;
   errno = 0;
index af7ce0c4981be0508be5e894d25abbc01173c601..21601825dbe5acea829f7aa1190cb87c60cb24bf 100644 (file)
@@ -1050,6 +1050,7 @@ static struct {
   { 2, 5, "Authentication failure" },
   { 2, 6, "Unacceptable hold time" },
   { 2, 7, "Required capability missing" }, /* [RFC3392] */
+  { 2, 8, "No supported AFI/SAFI" }, /* This error msg is nonstandard */
   { 3, 0, "Invalid UPDATE message" },
   { 3, 1, "Malformed attribute list" },
   { 3, 2, "Unrecognized well-known attribute" },
index 27a01485fbe22dd9102d7b3cff9e60c966e1138c..2f52fe9af9e4c0cb5faa9aeef0fb3311d2a3070f 100644 (file)
@@ -240,7 +240,7 @@ lsasum_check(struct ospf_lsa_header *h, void *body)
     c1 %= 255;
   }
 
-  x = ((length - LSA_CHECKSUM_OFFSET) * c0 - c1) % 255;
+  x = (int)((length - LSA_CHECKSUM_OFFSET) * c0 - c1) % 255;
   if (x <= 0)
     x += 255;
   y = 510 - c0 - x;
index f98a1bd30451e4bea6930a6e38baa7bd4c679704..8a949d86e6d8962eb1ebf5b4e756581d2519ee1f 100644 (file)
@@ -13,8 +13,8 @@
 #ifdef CPU_BIG_ENDIAN
 static inline void htonlsah(struct ospf_lsa_header *h, struct ospf_lsa_header *n) { *n = *h; };
 static inline void ntohlsah(struct ospf_lsa_header *n, struct ospf_lsa_header *h) { *h = *n; };
-static inline void htonlsab(void *h, void *n, u16 len) { memcpy(n, h, len); };
-static inline void ntohlsab(void *n, void *h, u16 len) { memcpy(h, n, len); };
+static inline void htonlsab(void *h, void *n, u16 len) { ASSERT(h != n); memcpy(n, h, len); };
+static inline void ntohlsab(void *n, void *h, u16 len) { ASSERT(n != h); memcpy(h, n, len); };
 static inline void htonlsab1(void *h, u16 len) { };
 static inline void ntohlsab1(void *n, u16 len) { };
 #else
index 79a15fac37ffc77e974a6a3ab3f5ae8df5e8dc11..e4598e21283b030c788238b5d300189ff2adb122 100644 (file)
@@ -66,7 +66,7 @@ else
 subdir: all.o
 
 all.o: $(objs)
-       $(LD) -r -o $@ $^
+       $(CC) -nostdlib  -Wl,-r -o $@ $^
 
 endif