Diff for /embedaddon/bird/proto/radv/config.Y between versions 1.1.1.1 and 1.1.1.2

version 1.1.1.1, 2017/08/22 12:33:54 version 1.1.1.2, 2021/03/17 19:50:23
Line 27  static u8 radv_mult_val; /* Used by radv_mult for seco Line 27  static u8 radv_mult_val; /* Used by radv_mult for seco
 CF_DECLS  CF_DECLS
   
 CF_KEYWORDS(RADV, PREFIX, INTERFACE, MIN, MAX, RA, DELAY, INTERVAL,  CF_KEYWORDS(RADV, PREFIX, INTERFACE, MIN, MAX, RA, DELAY, INTERVAL,
        MANAGED, OTHER, CONFIG, LINK, MTU, REACHABLE, TIME, RETRANS,        MANAGED, OTHER, CONFIG, LINGER, LINK, MTU, REACHABLE, TIME, RETRANS,
         TIMER, CURRENT, HOP, LIMIT, DEFAULT, VALID, PREFERRED, MULT,          TIMER, CURRENT, HOP, LIMIT, DEFAULT, VALID, PREFERRED, MULT,
         LIFETIME, SKIP, ONLINK, AUTONOMOUS, RDNSS, DNSSL, NS, DOMAIN,          LIFETIME, SKIP, ONLINK, AUTONOMOUS, RDNSS, DNSSL, NS, DOMAIN,
        LOCAL, TRIGGER, SENSITIVE, PREFERENCE, LOW, MEDIUM, HIGH)        LOCAL, TRIGGER, SENSITIVE, PREFERENCE, LOW, MEDIUM, HIGH, PROPAGATE,
         ROUTE, ROUTES, RA_PREFERENCE, RA_LIFETIME)
   
   CF_ENUM(T_ENUM_RA_PREFERENCE, RA_PREF_, LOW, MEDIUM, HIGH)
   
 %type<i> radv_mult radv_sensitive radv_preference  %type<i> radv_mult radv_sensitive radv_preference
   
 CF_GRAMMAR  CF_GRAMMAR
Line 58  radv_proto_item: Line 61  radv_proto_item:
      RADV_CFG->trigger_pxlen = $2.len;       RADV_CFG->trigger_pxlen = $2.len;
      RADV_CFG->trigger_valid = 1;       RADV_CFG->trigger_valid = 1;
    }     }
    | PROPAGATE ROUTES bool { RADV_CFG->propagate_routes = $3; }
  ;   ;
   
 radv_proto_opts:  radv_proto_opts:
Line 81  radv_iface_start: Line 85  radv_iface_start:
   RADV_IFACE->min_ra_int = -1; /* undefined */    RADV_IFACE->min_ra_int = -1; /* undefined */
   RADV_IFACE->max_ra_int = DEFAULT_MAX_RA_INT;    RADV_IFACE->max_ra_int = DEFAULT_MAX_RA_INT;
   RADV_IFACE->min_delay = DEFAULT_MIN_DELAY;    RADV_IFACE->min_delay = DEFAULT_MIN_DELAY;
     RADV_IFACE->prefix_linger_time = -1;
     RADV_IFACE->route_linger_time = -1;
   RADV_IFACE->current_hop_limit = DEFAULT_CURRENT_HOP_LIMIT;    RADV_IFACE->current_hop_limit = DEFAULT_CURRENT_HOP_LIMIT;
   RADV_IFACE->default_lifetime = -1;    RADV_IFACE->default_lifetime = -1;
   RADV_IFACE->default_lifetime_sensitive = 1;    RADV_IFACE->default_lifetime_sensitive = 1;
   RADV_IFACE->default_preference = RA_PREF_MEDIUM;    RADV_IFACE->default_preference = RA_PREF_MEDIUM;
     RADV_IFACE->route_lifetime = -1;
     RADV_IFACE->route_lifetime_sensitive = 0;
     RADV_IFACE->route_preference = RA_PREF_MEDIUM;
 };  };
   
 radv_iface_item:  radv_iface_item:
Line 102  radv_iface_item: Line 111  radv_iface_item:
      if (($3 < 0) || ($3 > 9000))  cf_error("Default lifetime must be in range 0-9000");       if (($3 < 0) || ($3 > 9000))  cf_error("Default lifetime must be in range 0-9000");
      if ($4 != -1) RADV_IFACE->default_lifetime_sensitive = $4;       if ($4 != -1) RADV_IFACE->default_lifetime_sensitive = $4;
    }     }
    | ROUTE LIFETIME expr radv_sensitive {
        RADV_IFACE->route_lifetime = $3;
        if ($4 != -1) RADV_IFACE->route_lifetime_sensitive = $4;
      }
  | DEFAULT PREFERENCE radv_preference { RADV_IFACE->default_preference = $3; }   | DEFAULT PREFERENCE radv_preference { RADV_IFACE->default_preference = $3; }
    | ROUTE PREFERENCE radv_preference { RADV_IFACE->route_preference = $3; }
    | PREFIX LINGER TIME expr { RADV_IFACE->prefix_linger_time = $4; }
    | ROUTE LINGER TIME expr { RADV_IFACE->route_linger_time = $4; }
  | PREFIX radv_prefix { add_tail(&RADV_IFACE->pref_list, NODE this_radv_prefix); }   | PREFIX radv_prefix { add_tail(&RADV_IFACE->pref_list, NODE this_radv_prefix); }
  | RDNSS { init_list(&radv_dns_list); } radv_rdnss { add_tail_list(&RADV_IFACE->rdnss_list, &radv_dns_list); }   | RDNSS { init_list(&radv_dns_list); } radv_rdnss { add_tail_list(&RADV_IFACE->rdnss_list, &radv_dns_list); }
  | DNSSL { init_list(&radv_dns_list); } radv_dnssl { add_tail_list(&RADV_IFACE->dnssl_list, &radv_dns_list); }   | DNSSL { init_list(&radv_dns_list); } radv_dnssl { add_tail_list(&RADV_IFACE->dnssl_list, &radv_dns_list); }
Line 125  radv_iface_finish: Line 141  radv_iface_finish:
   if (ic->default_lifetime == (u32) -1)    if (ic->default_lifetime == (u32) -1)
     ic->default_lifetime = 3 * ic->max_ra_int;      ic->default_lifetime = 3 * ic->max_ra_int;
   
     if (ic->route_lifetime == (u32) -1)
       ic->route_lifetime = 3 * ic->max_ra_int;
   
     if (ic->prefix_linger_time == (u32) -1)
       ic->prefix_linger_time = 3 * ic->max_ra_int;
   
     if (ic->route_linger_time == (u32) -1)
       ic->route_linger_time = 3 * ic->max_ra_int;
   
   if ((ic->min_ra_int > 3) &&    if ((ic->min_ra_int > 3) &&
       (ic->min_ra_int > (ic->max_ra_int * 3 / 4)))        (ic->min_ra_int > (ic->max_ra_int * 3 / 4)))
     cf_error("Min RA interval must be at most 3/4 * Max RA interval %d %d", ic->min_ra_int, ic->max_ra_int);      cf_error("Min RA interval must be at most 3/4 * Max RA interval %d %d", ic->min_ra_int, ic->max_ra_int);
   
   if ((ic->default_lifetime > 0) && (ic->default_lifetime < ic->max_ra_int))    if ((ic->default_lifetime > 0) && (ic->default_lifetime < ic->max_ra_int))
     cf_error("Default lifetime must be either 0 or at least Max RA interval");      cf_error("Default lifetime must be either 0 or at least Max RA interval");
   
     if ((ic->route_lifetime > 0) && (ic->route_lifetime < ic->max_ra_int))
       cf_error("Route lifetime must be either 0 or at least Max RA interval");
   
     if ((ic->prefix_linger_time > 0) && (ic->prefix_linger_time < ic->max_ra_int))
       cf_error("Prefix linger time must be either 0 or at least Max RA interval");
   
     if ((ic->route_linger_time > 0) && (ic->route_linger_time < ic->max_ra_int))
       cf_error("Route linger time must be either 0 or at least Max RA interval");
   
     RADV_CFG->max_linger_time = MAX_(RADV_CFG->max_linger_time, ic->route_linger_time);
 };  };
   
   
Line 166  radv_prefix_item: Line 202  radv_prefix_item:
  | AUTONOMOUS bool { RADV_PREFIX->autonomous = $2; }   | AUTONOMOUS bool { RADV_PREFIX->autonomous = $2; }
  | VALID LIFETIME expr radv_sensitive {   | VALID LIFETIME expr radv_sensitive {
      RADV_PREFIX->valid_lifetime = $3;       RADV_PREFIX->valid_lifetime = $3;
      if ($3 < 0) cf_error("Valid lifetime must be 0 or positive");  
      if ($4 != -1) RADV_PREFIX->valid_lifetime_sensitive = $4;       if ($4 != -1) RADV_PREFIX->valid_lifetime_sensitive = $4;
    }     }
  | PREFERRED LIFETIME expr radv_sensitive {   | PREFERRED LIFETIME expr radv_sensitive {
      RADV_PREFIX->preferred_lifetime = $3;       RADV_PREFIX->preferred_lifetime = $3;
      if ($3 < 0) cf_error("Preferred lifetime must be 0 or positive");  
      if ($4 != -1) RADV_PREFIX->preferred_lifetime_sensitive = $4;       if ($4 != -1) RADV_PREFIX->preferred_lifetime_sensitive = $4;
    }     }
  ;   ;
Line 300  radv_sensitive: Line 334  radv_sensitive:
    /* empty */ { $$ = -1; }     /* empty */ { $$ = -1; }
  | SENSITIVE bool { $$ = $2; }   | SENSITIVE bool { $$ = $2; }
  ;   ;
   
   CF_ADDTO(dynamic_attr, RA_PREFERENCE { $$ = f_new_dynamic_attr(EAF_TYPE_INT, T_ENUM_RA_PREFERENCE, EA_RA_PREFERENCE); })
   CF_ADDTO(dynamic_attr, RA_LIFETIME { $$ = f_new_dynamic_attr(EAF_TYPE_INT, T_INT, EA_RA_LIFETIME); })
   
 CF_CODE  CF_CODE
   

Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>