Changeset 12386
- Timestamp:
- 06/26/09 17:08:33 (5 months ago)
- Files:
-
- src/router/services/networking/firewall.c (modified) (1 diff)
- src/router/services/networking/udhcpc.c (modified) (1 diff)
- src/router/services/sysinit/defaults.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
src/router/services/networking/firewall.c
r12384 r12386 774 774 if (strlen(wanface) > 0) 775 775 save2file("-A POSTROUTING -o %s -j SNAT --to-source %s\n",wanface,nvram_safe_get("wan_ipaddr")); 776 if (nvram_match("wan_proto", "pptp") && nvram_match("pptp_use_dhcp", "1")) 777 { 778 save2file("-A POSTROUTING -o %s -j SNAT --to-source %s\n",nvram_safe_get("pptp_ifname"),nvram_safe_get("pptp_wan_ipaddr")); 779 }else 776 780 if (nvram_match("wan_proto", "pptp")) { 777 save2file("-A POSTROUTING -o %s -j SNAT --to-source %s\n",nvram_safe_get("pptp_ifname"),nvram_safe_get("wan_ipaddr")); 781 struct in_addr ifaddr; 782 osl_ifaddr(nvram_safe_get("pptp_ifname"),&ifaddr); 783 save2file("-A POSTROUTING -o %s -j SNAT --to-source %s\n",nvram_safe_get("pptp_ifname"),inet_ntoa(ifaddr)); 778 784 } 779 785 char *method = "MASQUERADE"; src/router/services/networking/udhcpc.c
r12380 r12386 234 234 if (nvram_match("wan_proto", "pptp") 235 235 && nvram_match("pptp_use_dhcp", "1")) 236 eval("ifconfig", wan_ifname, temp_wan_ipaddr, "netmask", 237 temp_wan_netmask, "up"); 236 { 237 eval("ifconfig", wan_ifname, temp_wan_ipaddr, "netmask",temp_wan_netmask, "up"); 238 nvram_set("pptp_wan_ipaddr",temp_wan_ipaddr); 239 } 238 240 else 239 241 eval("ifconfig", wan_ifname, nvram_safe_get("wan_ipaddr"), src/router/services/sysinit/defaults.c
r12269 r12386 253 253 {"wan_proto", "pptp", 0}, /* [static|dhcp|pppoe|disabled] */ 254 254 #elif defined(HAVE_GGEW) && defined(HAVE_EOC2610) 255 {"wan_proto", "pptp", 0}, /* [static|dhcp|pppoe|disabled] */ 256 #elif defined(HAVE_GGEW) 255 257 {"wan_proto", "pptp", 0}, /* [static|dhcp|pppoe|disabled] */ 256 258 #elif HAVE_X86
