netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* iproute2 query
@ 2016-02-19  9:12 Marcus Furlong
  2016-02-21 20:05 ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: Marcus Furlong @ 2016-02-19  9:12 UTC (permalink / raw)
  To: netdev

Hi,

Just wondering if the following command should work:

# ip route add 192.168.27.27/24 dev eth0 scope link src 192.168.27.27
RTNETLINK answers: Invalid argument

However, this command works:

# ip route add 192.168.27.0/24 dev eth0 scope link src 192.168.27.27

192.168.27.0/24 and 192.168.27.27/24 describe the same subnet?

Regards,
Marcus.

-- 
Marcus Furlong

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: iproute2 query
  2016-02-19  9:12 iproute2 query Marcus Furlong
@ 2016-02-21 20:05 ` Stephen Hemminger
  2016-02-23  0:19   ` Marcus Furlong
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2016-02-21 20:05 UTC (permalink / raw)
  To: Marcus Furlong; +Cc: netdev

On Fri, 19 Feb 2016 20:12:04 +1100
Marcus Furlong <furlongm@gmail.com> wrote:

> Hi,
> 
> Just wondering if the following command should work:
> 
> # ip route add 192.168.27.27/24 dev eth0 scope link src 192.168.27.27
> RTNETLINK answers: Invalid argument
> 
> However, this command works:
> 
> # ip route add 192.168.27.0/24 dev eth0 scope link src 192.168.27.27
> 
> 192.168.27.0/24 and 192.168.27.27/24 describe the same subnet?
> 
> Regards,
> Marcus.
> 

It is the kernel complaining, not ip command.
The kernel will not accept 192.168.27.27/24 as route since it is a full
network address, not an network prefix.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: iproute2 query
  2016-02-21 20:05 ` Stephen Hemminger
@ 2016-02-23  0:19   ` Marcus Furlong
  0 siblings, 0 replies; 3+ messages in thread
From: Marcus Furlong @ 2016-02-23  0:19 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev

On 22 February 2016 at 07:05, Stephen Hemminger
<stephen@networkplumber.org> wrote:
> On Fri, 19 Feb 2016 20:12:04 +1100
> Marcus Furlong <furlongm@gmail.com> wrote:
>
>> Hi,
>>
>> Just wondering if the following command should work:
>>
>> # ip route add 192.168.27.27/24 dev eth0 scope link src 192.168.27.27
>> RTNETLINK answers: Invalid argument
>>
>> However, this command works:
>>
>> # ip route add 192.168.27.0/24 dev eth0 scope link src 192.168.27.27
>>
>> 192.168.27.0/24 and 192.168.27.27/24 describe the same subnet?
>>
>
> It is the kernel complaining, not ip command.
> The kernel will not accept 192.168.27.27/24 as route since it is a full
> network address, not an network prefix.

Would it be a bad idea for the ip command to validate the data, and
only submit the network bits to the kernel?

Regards,
Marcus.

-- 
Marcus Furlong

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-23  0:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-19  9:12 iproute2 query Marcus Furlong
2016-02-21 20:05 ` Stephen Hemminger
2016-02-23  0:19   ` Marcus Furlong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).