Changeset 8951
- Timestamp:
- 02/06/08 17:45:26 (5 years ago)
- File:
-
- 1 edited
-
src/router/services/services/igmp.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/router/services/services/igmp.c
r8946 r8951 33 33 pid_t pid; 34 34 char name[80], *next, *svbuf; 35 char *argv[] = { "igmprt", NULL };35 char *argv[] = { "igmprt", NULL }; 36 36 37 37 38 38 39 39 stop_igmp_proxy (); 40 int ifcount = 0; 40 41 41 42 42 43 FILE *fp = fopen ("/tmp/igmpproxy.conf", "wb"); 44 fprintf (fp, "quickleave\n"); 45 fprintf (fp, "phyint %s upstream ratelimit 0 threshold 1\n", 46 nvram_safe_get ("wan_iface")); 43 47 if (nvram_match ("block_multicast", "0")) 44 48 { 45 FILE *fp = fopen ("/tmp/igmpproxy.conf", "wb");46 fprintf (fp, "quickleave\n");47 fprintf (fp, "phyint %s upstream ratelimit 0 threshold 1\n",48 nvram_safe_get ("wan_iface"));49 49 fprintf (fp, "phyint %s downstream ratelimit 0 threshold 1\n", 50 50 nvram_safe_get ("lan_ifname")); 51 foreach (name, nvram_safe_get ("lan_ifnames"), next) 51 ifcount++; 52 } 53 foreach (name, nvram_safe_get ("lan_ifnames"), next) 54 { 55 if (nvram_nmatch ("0", "%s_bridged", name) 56 && nvram_nmatch ("1", "%s_multicast", name)) 52 57 { 53 if (nvram_nmatch ("0", "%s_bridged", name) 54 && nvram_nmatch ("1", "%s_multicast", name)) 55 fprintf (fp, "phyint %s downstream ratelimit 0 threshold 1\n", 56 name); 57 else 58 fprintf (fp, "phyint %s disabled\n", name); 58 fprintf (fp, "phyint %s downstream ratelimit 0 threshold 1\n", 59 name); 60 ifcount++; 59 61 } 60 fprintf (fp, "phyint lo disabled\n"); 61 fclose (fp); 62 if (nvram_match ("wan_proto", "disabled")) //todo: add upstream config 63 { 62 else 63 fprintf (fp, "phyint %s disabled\n", name); 64 } 65 fprintf (fp, "phyint lo disabled\n"); 66 fclose (fp); 67 if (nvram_match ("wan_proto", "disabled")) //todo: add upstream config 68 { 64 69 // ret = _evalpid (igmp_proxybr_argv, NULL, 0, &pid); 65 return ret; 66 } 67 else 68 ret = _evalpid(argv, NULL, 0, &pid); 69 syslog (LOG_INFO, "igmprt : multicast daemon successfully started\n"); 70 return ret; 71 } 72 else 73 { 74 if (ifcount) 75 { 76 ret = _evalpid (argv, NULL, 0, &pid); 77 syslog (LOG_INFO, 78 "igmprt : multicast daemon successfully started\n"); 79 } 70 80 } 71 81
Note: See TracChangeset
for help on using the changeset viewer.
