[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: netconfig not working

From: Adrian Phillips
Subject: Re: netconfig not working
Date: 21 Feb 2002 12:15:54 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

>>>>> "Alain" == Alain van Hoof <address@hidden> writes:

Right, back to cfengine list.

    >>  Try replacing in ifconf.c :-
    >> IFR.ifr_addr = *((struct sockaddr *) &netmask);
    >> with :-
    >> IFR.ifr_netmask = *((struct sockaddr *) &netmask);

Can somebody who knows this ifreq stuff chime in here.

I checked the 2.4 code and found this in
net/ipv4/devinet.c :-

        case SIOCSIFNETMASK:    /* Set the netmask for the interface */
                if (!capable(CAP_NET_ADMIN))
                        return -EACCES;
                if (sin->sin_family != AF_INET)
                        return -EINVAL;

and a little later

                case SIOCSIFNETMASK:    /* Set the netmask for the interface */

                         *      The mask we set must be legal.
                        if (bad_mask(sin->sin_addr.s_addr, 0)) {
                                ret = -EINVAL;

                        if (ifa->ifa_mask != sin->sin_addr.s_addr) {
                                inet_del_ifa(in_dev, ifap, 0);
                                ifa->ifa_mask = sin->sin_addr.s_addr;
                                ifa->ifa_prefixlen = inet_mask_len(ifa->ifa_mask

And this is pratically the same for 2.2 it seems; I don't use this
action myself, has any one else used netconfig on a glibc 2.2 system
running kernel 2.2 and/or 2.4 ?

I am assuming you are using IPV4 Alain ?


Adrian Phillips

Your mouse has moved.
Windows NT must be restarted for the change to take effect.
Reboot now?  [OK]

reply via email to

[Prev in Thread] Current Thread [Next in Thread]