Skip to content

Commit 8ecda18

Browse files
committed
changed config option for igmp version selection
new 'proto' key for selection of either IGMPv1/v2 or IGMPv3
1 parent a2b5c18 commit 8ecda18

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

doc/igmpproxy.conf.5.in

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,14 @@ the risk of bandwidth saturation.
7878
.RE
7979

8080

81-
.B igmpv3
81+
.B proto
82+
.I protover
8283
.RS
83-
Enables IGMPv3 queries. On default settings, IGMPv1/2 queries are send out.
84-
With this setting, you can enable IGMPv3 frames for sending queries. This is needed
85-
for IGMPv3 capable hosts to send IGMPv3 reports. When a IGMPv3 capable host receives
86-
a IGMPv1/2 query, it answers with a IGMPv1/2 report.
84+
Specifies IGMP protocol version. On default or whith 'proto igmpv2', IGMPv1/2
85+
queries are send out. With 'proto igmpv3', you can enable IGMPv3 frames for
86+
sending queries. This is needed for IGMPv3 capable hosts to send IGMPv3 reports.
87+
When a IGMPv3 capable host receives a IGMPv1/2 query, it answers with a IGMPv1/2
88+
report.
8789
.RE
8890

8991

src/config.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,18 @@ int loadConfig(char *configFile) {
225225
token = nextConfigToken();
226226
continue;
227227
}
228-
else if(strcmp("igmpv3", token)==0) {
229-
// got an igmpv3 token
230-
my_log(LOG_DEBUG, 0, "Config: IGMPv3 mode enabled.");
231-
commonConfig.useIgmpv3 = 1;
228+
else if(strcmp("proto", token)==0) {
229+
// IGMP protocol version to use is in next token
230+
token = nextConfigToken();
231+
232+
if (strcmp("igmpv3", token) == 0) {
233+
my_log(LOG_DEBUG, 0, "Config: IGMPv3 mode enabled.");
234+
commonConfig.useIgmpv3 = 1;
235+
}
236+
else if (strcmp("igmpv2", token) == 0) {
237+
my_log(LOG_DEBUG, 0, "Config: IGMPv2 mode enabled.");
238+
commonConfig.useIgmpv3 = 0;
239+
}
232240

233241
// Read next token...
234242
token = nextConfigToken();

0 commit comments

Comments
 (0)