Modify

Opened 10 years ago

Closed 8 years ago

#2342 closed defect (fixed)

pptpd server and firewall

Reported by: anonymous Owned by: developers
Priority: normal Milestone:
Component: packages Version: Kamikaze trunk
Keywords: Cc:

Description

if I make a pptp connection to openwrt and then disconnect, after that I modify some rules in firewall and reload firewall will apear an error:
"rc.common : export 9: 192_168_1_118 variable not found" or something like that
192_168_1_118 is the ip making the connection

Attachments (3)

ppp_state.patch (601 bytes) - added by netprince (at) vt (dot) edu 10 years ago.
This patch corrected the problem for me.
100-ppp_statesave.patch (1.5 KB) - added by netprince (at) vt (dot) edu 10 years ago.
second try at the patch, confirmed pppoe problem with first one
100-ppp_statesave.patch2 (1.1 KB) - added by netprince (at) vt (dot) edu 10 years ago.
Third try, trying to keep it as simple as possible.

Download all attachments as: .zip

Change History (11)

comment:1 in reply to: ↑ description Changed 10 years ago by anonymous

Replying to anonymous:

if I make a pptp connection to openwrt and then disconnect, after that I modify some rules in firewall and reload firewall will apear an error:
"rc.common : export 9: 192_168_1_118 variable not found" or something like that
192_168_1_118 is the ip making the connection

the problem is after ending pptp connection /tmp/state/network remains with same config

comment:2 Changed 10 years ago by netprince (at) vt (dot) edu

confirmed. the file is not correctly handled by /etc/ppp/ip-up.

Changed 10 years ago by netprince (at) vt (dot) edu

This patch corrected the problem for me.

comment:3 Changed 10 years ago by anonymous

I modified the file and I got:

/etc/functions.sh: line 48: export: `CONFIG_192_168.1.118.up=1': not a valid identifier
/etc/functions.sh: line 48: export: `CONFIG_192_168.1.118.ifname=ppp1': not a valid identifier
/etc/functions.sh: line 48: export: `CONFIG_192_168.1.118.ipaddr=192.168.1.1': not a valid identifier
/etc/functions.sh: line 48: export: `CONFIG_192_168.1.118.gateway=192.168.1.200': not a valid identifier

kamikaze 7.07
wl500gp

comment:4 follow-up: Changed 10 years ago by anonymous

This patch also work for me , kamikaze 7.09/Wl700ge

comment:5 in reply to: ↑ 4 ; follow-up: Changed 10 years ago by anonymous

Replying to anonymous:

This patch also work for me , kamikaze 7.09/Wl700ge

I have an pppoe internet connection and maybe because it is an ppp adapter it show those errors, the firewall is working ok, but it is showing those errors

comment:6 in reply to: ↑ 5 Changed 10 years ago by anonymous

Replying to anonymous:

Replying to anonymous:

This patch also work for me , kamikaze 7.09/Wl700ge

I have an pppoe internet connection and maybe because it is an ppp adapter it show those errors, the firewall is working ok, but it is showing those errors

just found outt that if you put the same string

ppp_$(echo $6 | sed 's/\./_/g')

in ip-down file the /var/state/network file will be correctly adjusted after closeing pptp session

comment:7 Changed 10 years ago by peterATdc-eDOTbe

Hello,

I have a wrt54g3g (the one with the PCMCIA socket for 3g cards)

I tried to apply this patch and ran ito problems when using pptpd together with a ppp dial-out connection (3g connection using a Globetrotter card)

What I found out is that after applying https://dev.openwrt.org/attachment/ticket/2342/ppp_state.patch

PPP is unable to complete the dial-out (the 3G/UMTS led keeps on flashing).
This behaviour would probably be visible using other ppp client connections like pppoe or modem dial-out.

After some testing the only working solution for me was to add a condition like this ( "wan" is the name of my 3g ppp interface):

if [ "$6" = "wan" ]

then

PPP_IPPARAM="$6"

else

PPP_IPPARAM="ppp_$(echo $6 | sed 's/\./_/g')"

fi

In the end I changed the substitution after "else" to PPP_IPPARAM="$1"
This made a cleaner /var/state/network indicating the ifname instead of the Masked IP address of the remote connection.

I don't think this is the best solution but the patch published doesn't work for me.
Anyway unconditionally this has to be inserted into both ip-up and ip-down in /etc/ppp/

Changed 10 years ago by netprince (at) vt (dot) edu

second try at the patch, confirmed pppoe problem with first one

Changed 10 years ago by netprince (at) vt (dot) edu

Third try, trying to keep it as simple as possible.

comment:8 Changed 8 years ago by thepeople

  • Resolution set to fixed
  • Status changed from new to closed
  • Version set to Kamikaze trunk

committed r19872.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.