summaryrefslogtreecommitdiffstats
path: root/loader2/net.c
Commit message (Collapse)AuthorAgeFilesLines
* Renamed loader2 subdirectory to loader (hooray for git)David Cantrell2008-08-251-2090/+0
|
* Do not include wireless.h or call is_wireless_device()David Cantrell2008-08-251-6/+0
| | | | Removed these functions, so do not call them from loader.
* Include ../isys/ethtool.h instead of ../isys/net.h.David Cantrell2008-08-251-1/+1
|
* Removed waitForLink() function in loader.David Cantrell2008-08-251-35/+0
| | | | | Another function that we don't need since we're using NetworkManager now.
* Remove initLoopback() function in loaderDavid Cantrell2008-08-251-30/+0
|
* Use D-Bus properties to get current NM state.David Cantrell2008-08-251-44/+65
| | | | | | | | In order to make get_connection() work initially, I was doing what nm-online was doing, which wasn't that spectacular. I have changed it to using the State property (with the help of Dan Williams). Dan would prefer that other programs talking to NetworkManager use properties as much as possible.
* Use NetworkManager instead of libdhcp. (#458183)David Cantrell2008-08-251-710/+681
| | | | | | | | | | | Finally, no more libdhcp. This is the first set of changes to take anaconda over to the wonderful world of NetworkManager. We are no longer linking with libdhcp to do interface configuration. NM is started early in the installation and opens the door to things like WPA installation support and things like that.
* Remove extra newtPopWindow() call that was causing a crash (#260621).David Cantrell2008-08-061-1/+0
|
* Compile fixes.Chris Lumens2008-07-231-1/+1
|
* Offer physical NIC identification in stage 1 (#261101)David Cantrell2008-07-221-15/+82
| | | | | | | | | | This has been requested for a while. Some people have wanted the ability to do an 'ethtool -p' from stage 1 so they can figure out what NIC port to use. I can understand arguments for this feature, but I have still tried to make it more or less non-invasive. A new button is on the dev selection screen called Identify. Self-explanatory from there.
* Set interface MTU if user specified mtu= param (#435874)David Cantrell2008-07-161-8/+34
| | | | | If the user passed mtu=X as a boot parameter, set the interface MTU to that value before configuring the network.
* If network config info isn't provided for cmdline, abort.Chris Lumens2008-07-111-3/+11
|
* Use %m rather than strerror() where appropriate.Peter Jones2008-07-081-26/+15
|
* Check return value of asprintf() consistentlyDavid Cantrell2008-06-271-18/+40
| | | | | | | | | For instances where the asprintf() was ignored, wrap it in a test to check if it failed. If it failed, log a message and abort. There may be some instances where abort may not be what we want to do, however, we were ignoring the return value completely so if we did get a failure, it would just SIGSEGV. Now it will SIGABRT instead.
* Per strtol(3) man page, set errno=0 before call.David Cantrell2008-06-271-0/+5
| | | | | | | | | | From the NOTES section of strtol(3): "Since strtol() can legitimately return 0, LONG_MAX, or LONG_MIN (LLONG_MAX or LLONG_MIN for strtoll()) on both success and failure, the calling program should set errno to 0 before the call, and then determine if an error occurred by checking whether errno has a non-zero value after the call."
* Use strtol() instead of atoi()David Cantrell2008-06-261-5/+42
| | | | | | | Code cleanup patch. Use strtol() to convert strings to ints, rather than atoi(). No error checking capability with atoi(). Also add error handling to detect strtol failures.
* Changes related to BZ #230949David Cantrell2008-04-211-12/+39
| | | | | | | | | | Require the latest libdhcp so that 230949 works. We allowed users to only enter a single network stack's information when doing manual configuration, but the library didn't like that. Also, I had some cleanup code in net.c that I left throughout the entire process of working on 230949 and since it now works, I'd rather just leave it here than back it out. It's all safe.
* Fix up compile error for new newtJeremy Katz2008-03-251-3/+3
|
* Make sure host lookups work for manual net config (#435574).David Cantrell2008-03-111-3/+1
| | | | | | | | | | | Follow-on to pjones' patch (d0f8a7473a36d6c54e7d6751b2b1200248a3a9b5), but do not create a new struct addr and do not use inet_aton(). For name<->ip conversions, please use the inet_pton() and inet_ntop() functions so we can pretend to support IPv6. Use the IP_ADDR() macro for now that pulls the correct struct addr or struct addr6 and passes it to gethostbyaddr(). IPv4 and IPv6 reverse lookups should be working at this point in loader.
* Change the method config prompts.Chris Lumens2008-03-041-4/+0
|
* Fix reverse name lookup.Peter Jones2008-02-291-2/+4
|
* Rename nl.c to iface.c and functions to iface_*David Cantrell2008-02-081-2/+2
| | | | | | Rename the interface control functions to start with iface_ rather than nl_. The libnl API uses nl_ and it gets confusing if we use that here too.
* Remove our own DNS functions, since glibc's are available now.Chris Lumens2008-02-051-4/+7
|
* Revert "Initial support for network --bootproto=ask (#401531)."Chris Lumens2008-01-301-10/+3
| | | | This reverts commit 062a1e5ebbf6dab03524a125c1ce34d3cea43fcb.
* Avoid possible SIGSEGV from empty loaderData values.David Cantrell2008-01-221-12/+16
| | | | | | Hit a case doing kickstart installs where loaderData->ipv6 or loaderData->ipv4 could be empty around this point. Check to make sure they are not NULL before calling inet_pton().
* Use libnl to get interface MAC and IP addressesDavid L. Cantrell Jr2008-01-221-1/+1
| | | | | | | | | | | | | Reduce nl.c to enough to communicate with libnl. We already have libnl, so we might as well use it. Plus, the latest version has a reasonable API, so I'm totally against using it. The _isys module and loader have been updated to call the new functions: nl_mac2str() and nl_ip2str() to get the MAC address or IP address for the specified interface. This patch also drops our need for glib for isys. Yeah, I added the dep and I'm removing it.
* Complete the patch for dhcptimeout (#198147, #254032)Martin Sivak2008-01-171-3/+9
|
* Initial support for network --bootproto=ask (#401531).Chris Lumens2008-01-161-3/+10
| | | | | | | | This patch adds support for a new network bootproto. The point of this is to work around our basic assumption that no network line in the kickstart file means you get dhcp. Some environments may want the assumption that no network line means you get prompted for network configuration. That's what this patch adds.
* Add nicdelay parameter to loader, so we can wait before sending DHCP requestsMartin Sivak2008-01-101-1/+0
| | | | in the case of STP delays (#349521).
* Add dhcpdelay to loader so we can modify the default dhcp timeout (#198147, ↵Martin Sivak2008-01-101-1/+7
| | | | #254032)
* Adjust loader to new hardware code.Bill Nottingham2007-12-201-12/+5
|
* Clean up typos and other things for GPLv2+ changes.David Cantrell2007-12-171-1/+1
| | | | | | | Shorten 'Red Hat Author(s)' to just 'Author(s)'. Perhaps eventually we'll get an AUTHORS file and will just remove author names from the individual files. Also fixed a type in scripts/dumphdrlist.py where Author was listed twice.
* GPLv2+ boilerplates for loader2/ source files.David Cantrell2007-12-171-18/+17
|
* Merge the FTP and HTTP methods into a single URL method.Chris Lumens2007-12-071-7/+3
| | | | | | | This removes the separate FTP and HTTP network method dialogs in the loader and replaces them with a single configuration dialog that asks the user to input a URL. It also modified the secondary config screen to prompt just for a proxy and simplifies a lot of the conversion from URL to UI and back.
* Correct the previous patch, we were doing the nicdelay on the wrong place. ↵Martin Sivak2007-11-201-8/+10
| | | | (#349521)
* Add the nicdelay command line option (#349521)Martin Sivak2007-11-061-0/+9
|
* - remove sdupprintf(), use asprintf() instead.Peter Jones2007-10-221-11/+17
|
* 2007-09-12 Jeremy Katz <katzj@redhat.com>Jeremy Katz2007-09-121-0/+5
| | | | | | | | * loader2/net.c (chooseNetworkInterface): Don't pick wireless adapters unless explicitly requested * loader2/loader.c (parseCmdLineFlags): Add wireless flag * loader2/loader.h: Likewise.
* * loader2/loader.c (doLoaderMain): In STEP_IP, set the hostname ifDavid Cantrell2007-09-041-0/+7
| | | | | | | we were provided one by the user (#180451). * loader2/net.c (doDhcp): If we got a hostname from DHCP, set it (#180451).
* * loader2/loader.c (doLoaderMain): In STEP_IFACE, if we are doingDavid Cantrell2007-09-041-1/+7
| | | | | | | | a kickstart install, flag it. Init ipv4method and ipv6method (#260621). * loader2/loader.h: Add LOADER_FLAGS_IS_KICKSTART and FL_IS_KICKSTART() (#260621). * loader2/net.c (configureTCPIP): Set skipForm to 1 if kickstart flag is set (#260621).
* * loader2/net.c (chooseNetworkInterface): Skip devices that do notDavid Cantrell2007-08-301-2/+11
| | | | | | | | | | | | have firmware loaded (#251941). * scripts/upd-instroot: Add *-firmware to PACKAGES for now. We'll change this later once the kernel provides us with more info (#177452). * scripts/mk-images (makeinitrd): Remove arch test for copying over firmware files. Just check the module list and copy firmware, also add atmel and iwl4965 (#177452).
* * loader2/net.c (cidrCallback): If user provided a dotted-quadDavid Cantrell2007-08-221-0/+4
| | | | | netmask for IPv4, check it and if it validates, skip the CIDR validation (#243250).
* Same change you just saw on rhel5-branch ported to the HEAD branch.David Cantrell2007-08-061-51/+58
|
* Use a different macro so anaconda will actually build.Chris Lumens2007-06-121-1/+1
|
* * loader2/net.c (manualNetConfig): Make sure the ip structure memberDavid Cantrell2007-06-011-23/+10
| | | | | in the pumpNetIntf structure contains the IPv4 address if it exists, otherwise static network configuration fails (#221660).
* * loader2/loader.c (doLoaderMain): Don't crash if the user selects backDavid Cantrell2007-05-231-2/+6
| | | | | | | twice during network configuration (#239958). * loader2/net.c (cidrCallback): Only warn for an empty prefix if the user also provided an IP address.
* * loader2/net.c: Consistency with isys.c, also fixes a problem reportedDavid Cantrell2007-05-221-8/+7
| | | | | by just a few people where manual IPv6 address entry gets overridden by the auto-discovered address.
* White space.David Cantrell2007-05-161-2/+2
|
* * loader2/net.c: Patch from Dawei Pang <dwpang AT redflag-linux.com>David Cantrell2007-05-041-6/+6
| | | | to fix segfaults on 64-bit arches during manual TCP/IP config.
* * rescue.py (startNetworking): Call the right functions to bring upDavid Cantrell2007-04-271-5/+0
| | | | | | | | | | | | | networking in rescue mode when booting from CD or DVD (#238080) * isys/isys.py: Remove pumpNetDevice, replace with dhcpNetDevice that can handle IPv4 and IPv6 (#238080). * isys/isys.c (doDhcpNetDevice): Handle IPv4 and IPv6 stacks (#238080). * isys/isys.c (doConfigNetDevice): Likewise. * loader2/net.c (setupNetworkDeviceConfig): The netmask will never be an IPv6 address.