summaryrefslogtreecommitdiff
path: root/proto/radv
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2021-06-17 16:56:51 +0200
committerMaria Matejka <mq@ucw.cz>2021-09-10 17:32:05 +0200
commit47d92d8f9d9891a9b40f3fbef1d762537af4ae25 (patch)
treed26884e08f332251bff8e8b4962fc97e19541bf3 /proto/radv
parent3f19100f5a47dce96d336d68e0cbe72de5d9ba60 (diff)
Nest: Clean up main channel handling
Remove assumption that main channel is the only channel.
Diffstat (limited to 'proto/radv')
-rw-r--r--proto/radv/config.Y1
-rw-r--r--proto/radv/radv.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/proto/radv/config.Y b/proto/radv/config.Y
index dda9cfcd..8d4a3ab9 100644
--- a/proto/radv/config.Y
+++ b/proto/radv/config.Y
@@ -46,6 +46,7 @@ proto: radv_proto ;
radv_proto_start: proto_start RADV
{
this_proto = proto_config_new(&proto_radv, $1);
+ this_proto->net_type = NET_IP6;
init_list(&RADV_CFG->patt_list);
init_list(&RADV_CFG->pref_list);
diff --git a/proto/radv/radv.c b/proto/radv/radv.c
index b4235917..66e8eb4b 100644
--- a/proto/radv/radv.c
+++ b/proto/radv/radv.c
@@ -564,7 +564,7 @@ radv_postconfig(struct proto_config *CF)
// struct radv_config *cf = (void *) CF;
/* Define default channel */
- if (EMPTY_LIST(CF->channels))
+ if (! proto_cf_main_channel(CF))
channel_config_new(NULL, net_label[NET_IP6], NET_IP6, CF);
}