Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 408551 - net-misc/networkmanager has iptables failure when connection sharing
Summary: net-misc/networkmanager has iptables failure when connection sharing
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Nirbheek Chauhan (RETIRED)
URL: https://bugs.archlinux.org/task/25928
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-03-17 07:06 UTC by Andy Botting
Modified: 2012-10-07 08:21 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Connection sharing patch (connection_sharing_fix.patch,916 bytes, patch)
2012-03-17 07:07 UTC, Andy Botting
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Botting 2012-03-17 07:06:53 UTC
When using NetworkManager for connection sharing, the following error message is displayed in the kernel messages file.

<info> Executing: /sbin/iptables --table nat --insert POSTROUTING --source 10.42.43.0/255.255.255.0 --destination ! 10.42.43.0/255.255.255.0 --jump MASQUERADE
<warn> ** Command returned exit status 2.

$ /sbin/iptables --table nat --insert POSTROUTING --source 10.42.43.0/255.255.255.0 --destination ! 10.42.43.0/255.255.255.0 --jump
Bad argument `10.42.43.0/255.255.255.0'
Try `iptables -h' or 'iptables --help' for more information.

The patch (thanks to Ignacio Aguilera) changes the ordering of the arguments to iptables to make this command valid. The correct syntax should look like (NOTE the ! is now moved in front of the --destination argument):

$ /sbin/iptables --table nat --insert POSTROUTING --source 10.42.43.0/255.255.255.0 ! --destination 10.42.43.0/255.255.255.0 --jump

I can confirm this patch works with 0.8.4.0-r2 and the Arch Linux report mentions it works with networkmanager-0.9.0-1.

Reproducible: Always
Comment 1 Andy Botting 2012-03-17 07:07:53 UTC
Created attachment 305673 [details, diff]
Connection sharing patch
Comment 2 Pacho Ramos gentoo-dev 2012-10-07 08:21:22 UTC
Should be fixed in latest version
https://bugzilla.gnome.org/show_bug.cgi?id=658571