Opened 4 years ago

Closed 3 years ago

#16634 closed defect (moved_to_github)

proto openconnect does not work with password authentication

Reported by: anonymous Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: packages Version: Trunk
Keywords: Cc:


When attempting to ifup an openconnect vpn connection for an interface named 'work', the connection does not get established and syslog contains the message:

netifd: work (7113): fgets (stdin): Bad file descriptor

It turns out that the netifd proto/ script in netifd is attempting to use a stdin redirect to provide the vpn password to the command:

proto_run_command "$config" /usr/sbin/openconnect $cmdline <$pwfile

It looks like the pwfile redirect is lost so the password never makes it to openconnect. In order to work around this I've restored part of an openwrt patch that was used in older versions of openconnect that enables passwords in a file. This change enables successful connections.

On the teardown side, the variable "$config" is used but was never set so the connection would never come down. The function needs to use $1 from the arg list.

proto_kill_command "$config"

Attachments (1)

openconnect.diff (3.5 KB) - added by anonymous 4 years ago.

Download all attachments as: .zip

Change History (3)

Changed 4 years ago by anonymous


comment:1 Changed 3 years ago by anonymous


As this isn't in the base openwrt packages please use the issue tracker of

I've committed a slightly different fix, to avoid applying a patch to openconnect:

comment:2 Changed 3 years ago by florian

  • Resolution set to moved_to_github
  • Status changed from new to closed

Add Comment

Modify Ticket

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

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

Note: See TracTickets for help on using tickets.