After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 724312 - Can't assign IP Address without Gateway
Can't assign IP Address without Gateway
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Network
3.11.x
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-02-13 18:26 UTC by Asif Ali Rizvan
Modified: 2014-02-18 08:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot of ipv4 settings (disabled add button) (29.00 KB, image/png)
2014-02-13 18:26 UTC, Asif Ali Rizvan
  Details
network: don't warn for invalid settings (6.76 KB, patch)
2014-02-17 20:37 UTC, Giovanni Campagna
committed Details | Review
network: allow an empty gateway address in the connection editor (1.09 KB, patch)
2014-02-17 20:38 UTC, Giovanni Campagna
committed Details | Review

Description Asif Ali Rizvan 2014-02-13 18:26:58 UTC
Created attachment 269056 [details]
screenshot of ipv4 settings (disabled add button)

It is not necessary to have default gw (gateway) for a Peer-to-Peer network.

How can we assign ip address like:

ifconfig eth0 192.168.1.2 up 

with network settings?

The Network settings makes the "add" button disabled unless we assign a default gateway, which is not really required in a p2p network.

Please allow to add ip address without gateway address. thanks.
Comment 1 Giovanni Campagna 2014-02-13 18:40:11 UTC
You should be able to configure the network without a gateway if you check "Use this connection only for resources on its network" (which prevents NM for considering it as a default route candidate)
Comment 2 Asif Ali Rizvan 2014-02-14 13:04:26 UTC
I checked that, still "Add" button is not enabled unless I enter gateway ip address.

The minimal thing to work in a p2p network is IP address and Netmask; gateway is for internet connectivity.

I tried to connect Xerox machines to the pc, where there is no internet connection and only a hub with 2 systems and 2 network printers/xerox machines.

I had to manually do the assignment using ifconfig.
Comment 3 Giovanni Campagna 2014-02-17 20:37:56 UTC
Created attachment 269467 [details] [review]
network: don't warn for invalid settings

g_warning() is for environment errors, not user errors. Not being
able to click OK is enough to understand that something is wrong,
and if not we should highlight the faulty setting, not spam the logs,
expecially in the middle of digitation. Keep a log anyway, for
debugging.
Comment 4 Giovanni Campagna 2014-02-17 20:38:02 UTC
Created attachment 269468 [details] [review]
network: allow an empty gateway address in the connection editor

It appears that this has always been the intention of the code,
but the check was incomplete.
Comment 5 Bastien Nocera 2014-02-18 06:52:13 UTC
Review of attachment 269467 [details] [review]:

"digitation". I think you mean "typing" unless you come from the 19th century :)

And where are you "keeping a log"? You're downgrading warnings to debug statements.

The patch itself looks good
Comment 6 Bastien Nocera 2014-02-18 07:10:55 UTC
Review of attachment 269468 [details] [review]:

Looks good.
Comment 7 Bastien Nocera 2014-02-18 08:49:00 UTC
Attachment 269467 [details] pushed as 8b6f9af - network: don't warn for invalid settings
Attachment 269468 [details] pushed as 41b33dc - network: allow an empty gateway address in the connection editor