]> git.ipfire.org Git - thirdparty/bird.git/blobdiff - proto/radv/radv.c
No more warnings ...
[thirdparty/bird.git] / proto / radv / radv.c
index 8a79dfaf245851f57768dafc14a5c40590dbce18..a381f7372a491509a2dd310e6c1a52c98e80b727 100644 (file)
@@ -174,7 +174,7 @@ radv_prepare_prefixes(struct radv_iface *ifa)
     if (pfx->valid && !pfx->mark)
     {
       RADV_TRACE(D_EVENTS, "Invalidating prefix %N on %s",
-                pfx->prefix, ifa->iface->name);
+                &pfx->prefix, ifa->iface->name);
 
       pfx->valid = 0;
       pfx->changed = now;
@@ -201,7 +201,7 @@ radv_prune_prefixes(struct radv_iface *ifa)
       if (expires <= now)
       {
        RADV_TRACE(D_EVENTS, "Removing prefix %N on %s",
-                  px->prefix, ifa->iface->name);
+                  &px->prefix, ifa->iface->name);
 
        rem_node(NODE px);
        mb_free(px);
@@ -230,6 +230,7 @@ radv_iface_notify(struct radv_iface *ifa, int event)
   {
   case RA_EV_CHANGE:
     radv_invalidate(ifa);
+    /* fallthrough */
   case RA_EV_INIT:
     ifa->initial = MAX_INITIAL_RTR_ADVERTISEMENTS;
     radv_prepare_prefixes(ifa);
@@ -395,7 +396,7 @@ radv_net_match_trigger(struct radv_config *cf, net *n)
 }
 
 int
-radv_import_control(struct proto *P, rte **new, ea_list **attrs UNUSED, struct linpool *pool UNUSED)
+radv_import_control(struct proto *P, rte **new, struct linpool *pool UNUSED)
 {
   // struct radv_proto *p = (struct radv_proto *) P;
   struct radv_config *cf = (struct radv_config *) (P->cf);
@@ -410,7 +411,7 @@ radv_import_control(struct proto *P, rte **new, ea_list **attrs UNUSED, struct l
 }
 
 static void
-radv_rt_notify(struct proto *P, struct channel *ch UNUSED, net *n, rte *new, rte *old UNUSED, ea_list *attrs)
+radv_rt_notify(struct proto *P, struct channel *ch UNUSED, net *n, rte *new, rte *old UNUSED)
 {
   struct radv_proto *p = (struct radv_proto *) P;
   struct radv_config *cf = (struct radv_config *) (P->cf);
@@ -448,11 +449,11 @@ radv_rt_notify(struct proto *P, struct channel *ch UNUSED, net *n, rte *new, rte
   {
     /* Update */
 
-    ea = ea_find(attrs, EA_RA_PREFERENCE);
+    ea = ea_find(new->attrs->eattrs, EA_RA_PREFERENCE);
     uint preference = ea ? ea->u.data : RA_PREF_MEDIUM;
     uint preference_set = !!ea;
 
-    ea = ea_find(attrs, EA_RA_LIFETIME);
+    ea = ea_find(new->attrs->eattrs, EA_RA_LIFETIME);
     uint lifetime = ea ? ea->u.data : 0;
     uint lifetime_set = !!ea;
 
@@ -762,7 +763,7 @@ radv_get_attr(eattr *a, byte *buf, int buflen UNUSED)
 struct protocol proto_radv = {
   .name =              "RAdv",
   .template =          "radv%d",
-  .attr_class =                EAP_RADV,
+  .class =             PROTOCOL_RADV,
   .channel_mask =      NB_IP6,
   .proto_size =                sizeof(struct radv_proto),
   .config_size =       sizeof(struct radv_config),