]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Minor bugfixes.
authorOndrej Zajicek <santiago@crfreenet.org>
Thu, 18 Jun 2009 12:32:44 +0000 (14:32 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Thu, 18 Jun 2009 12:32:44 +0000 (14:32 +0200)
lib/ipv6.h
proto/ospf/config.Y

index 9193c4f19fc801941277a966f488ae85d6198686..9cec86e7a86019161af5d403cca172bf66abefd6 100644 (file)
@@ -31,7 +31,11 @@ typedef struct ipv6_addr {
 
 #define IPA_NONE _MI(0,0,0,0)
 
-#define ipa_equal(x,y) (!memcmp(&(x),&(y),sizeof(ip_addr)))
+#define ipa_equal(x,y)  ({ ip_addr _a=(x), _b=(y); \
+                          _I0(_a) == _I0(_b) && \
+                          _I1(_a) == _I1(_b) && \
+                          _I2(_a) == _I2(_b) && \
+                          _I3(_a) == _I3(_b); })
 #define ipa_nonzero(x) ({ ip_addr _a=(x); (_I0(_a) || _I1(_a) || _I2(_a) || _I3(_a)); })
 #define ipa_and(x,y) ({ ip_addr _a=(x), _b=(y); \
                     _MI(_I0(_a) & _I0(_b), \
index 0f688a7ee19ee408c49d93dacda6d77f73d423ca..77ca26cfdd627e3fca83a04b0bada4e81f532284 100644 (file)
@@ -104,7 +104,7 @@ ospf_stubnet:
 
 ospf_stubnet_start:
    prefix {
-     this_stubnet = cfg_allocz(sizeof(struct stubnet_config));
+     this_stubnet = cfg_allocz(sizeof(struct ospf_stubnet_config));
      add_tail(&this_area->stubnet_list, NODE this_stubnet);
      this_stubnet->px = $1;
      this_stubnet->cost = COST_D;