]>
Commit | Line | Data |
---|---|---|
f5da5f84 JR |
1 | --- gated-3-5-10/src/task.c~ Sun Jul 12 12:46:02 1998 |
2 | +++ gated-3-5-10/src/task.c Thu Oct 29 13:19:41 1998 | |
3 | @@ -4812,7 +4812,26 @@ | |
4 | ||
5 | setsocketopt: | |
6 | if (!BIT_TEST(task_state, TASKS_TEST)) { | |
7 | - rc = setsockopt(tp->task_socket, level, opt, ptr, len); | |
8 | + | |
9 | +#ifdef IP_MULTICAST | |
10 | +#ifdef linux | |
11 | +#if LINUX_VERSION_CODE < 0x020100 | |
12 | + /* Linux 2.0.x multicast address hack to fix interface ifconfig | |
13 | + * down then ifconfig up problem | |
14 | + * This problem has something to do with kernel internals and the | |
15 | + * multicast address list on an interface getting cleared when | |
16 | + * it physically goes down... | |
17 | + */ | |
18 | + if(option == TASKOPTION_GROUP_ADD) { | |
19 | + /* CLEAR the kernel multicast address so that we can reinitialise | |
20 | + * the kernel's multicast address list on the multicast interface | |
21 | + */ | |
22 | + setsockopt(tp->task_socket, level, IP_DROP_MEMBERSHIP, ptr, len); | |
23 | + } | |
24 | +#endif | |
25 | +#endif | |
26 | +#endif /* IP_MULTICAST && Linux */ | |
27 | + rc = setsockopt(tp->task_socket, level, opt, ptr, len); | |
28 | } | |
29 | break; | |
30 |