linux.sh processes empty/missing subinterface file

Bug #1312649 reported by Russell Phillips
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
gogoc (Debian)
Fix Released
Unknown
gogoc (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

After upgrading from 12.04 to 14.04, I noticed that gogoc no longer started. I tracked it down to a logical error in the bash script to build the tunnel.

The following line appears 3 times in /usr/share/gogoc/template/linux.sh (lines 167, 279 and 312):

echo "$subif" | while read sub int ; do

It needs to first test that $subif is not empty.

When the subinterfaces file (/etc/gogoc/interfaces.conf) is empty or missing, the subif variable has an empty value.

What is happening, is that the radvd config file is populated with a second interface containing uninitialized nonsense, and radvd in turn fails to parse the config file. Radvd will then return an error status and gogoc will react by tearing down the tunnel.

Tags: patch
Revision history for this message
Russell Phillips (ignissport) wrote :
description: updated
description: updated
description: updated
description: updated
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "gogoc-bug.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gogoc (Ubuntu):
status: New → Confirmed
Revision history for this message
John S. Gruber (jsjgruber) wrote :

I tested Russel's patch and it worked for me (after I created the /var/run/gogoc/ directory by hand).

Good work, Russel.

Revision history for this message
John S. Gruber (jsjgruber) wrote :

I think this is a regression due to debian bug #651251.

It might help this bug along if you sent your patch to <email address hidden> to add it as a comment to that Debian bug. A reference to this bug report might help tie things together.

Before you do that you might check that bug at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=731256 to see if you agree with me that it is the same bug you are reporting here.

Changed in gogoc (Debian):
status: Unknown → New
Revision history for this message
Russell Phillips (ignissport) wrote :

John,

That looks exactly like what I saw. You can see it in his log where "Adding prefix" is repeated, but the second interface contains a null name and IPv6 address:

2013/12/03 23:03:28 I gogoc: Adding prefix to wlan0
2013/12/03 23:03:28 I gogoc: /sbin/ifconfig wlan0 add 2001:05c0:1506:de00::1/64
2013/12/03 23:03:28 I gogoc: Adding prefix to
2013/12/03 23:03:28 I gogoc: /sbin/ifconfig inet6 add ::1/64

I replied to the bug and pasted a URL to point back to here.

Revision history for this message
menner (menner) wrote :

patch fixes the problem on utopic

Changed in gogoc (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.