Page MenuHomeFreeBSD

Do not allow use `create` keyword as hostname when ifconfig(8) invoked for already existing interface
ClosedPublic

Authored by ae on Sep 14 2018, 10:40 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 9 2024, 5:25 PM
Unknown Object (File)
Jan 31 2024, 3:58 PM
Unknown Object (File)
Jan 11 2024, 10:51 PM
Unknown Object (File)
Nov 30 2023, 9:36 AM
Unknown Object (File)
Sep 17 2023, 3:37 PM
Unknown Object (File)
Aug 29 2023, 10:02 AM
Unknown Object (File)
Aug 26 2023, 3:52 AM
Unknown Object (File)
Aug 13 2023, 10:37 AM
Subscribers

Details

Summary

It appeared, that ifconfig(8) assumes create keyword as hostname and tries to resolve it, when ifconfig ifname create invoked for already existing interface. This can produce some unexpected results, when hostname resolving successfully happened. This patch adds check for such case.
When an interface is already exists, and create is only one argument, return error message. But when there are some other arguments, just remove create keyword from the arguments list.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ae added a reviewer: network.
This revision was not accepted when it landed; it landed in state Needs Review.Oct 21 2018, 2:40 PM
This revision was automatically updated to reflect the committed changes.
yuripv added inline comments.
head/sbin/ifconfig/ifconfig.c
515

grammar nit: exists