lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sun, 21 Oct 2007 21:05:15 +0200
From:	"Joakim Tjernlund" <joakim.tjernlund@...nsmode.se>
To:	"'Patrick McHardy'" <kaber@...sh.net>
Cc:	<netdev@...r.kernel.org>
Subject: RE: how to set pppoe source mac address?

> -----Original Message-----
> From: Patrick McHardy [mailto:kaber@...sh.net] 
> Sent: den 21 oktober 2007 19:51
> To: Joakim Tjernlund
> Cc: netdev@...r.kernel.org
> Subject: Re: how to set pppoe source mac address?
> 
> Joakim Tjernlund wrote:
> > I have several pppoe i/f's over one eth i/f and I want to set the
> > source mac address used by each pppoe i/f to a unique mac 
> address from
> > user space.
> > 
> > Is this possible? If so, how do I do that?
> 
> 
> Try the macvlan driver.
> 

Thanks, but I can't see that it will help.

I am looking for something like this that I currently have added
to pppoe_ioctl() in pppoe.c: 
 
 case PPPOEIOCSSRCMAC:
        {
            struct relay_source_mac smac;

            err = -EBUSY;
            if (sk->sk_state & (PPPOX_BOUND|PPPOX_ZOMBIE|PPPOX_DEAD))
                break;

            err = -ENOTCONN;
            if (!(sk->sk_state & PPPOX_CONNECTED))
                break;

            err = -EFAULT;
            if (copy_from_user(&smac, (void *) arg, sizeof(smac)))
                break;

            memcpy(po->srcmac, smac.srcmac, ETH_ALEN);

            err = 0;
            break;
        }

then changed the call to hard_header in __pppoe_xmit() to
     dev->hard_header(skb, dev, ETH_P_PPP_SES,
                      po->pppoe_pa.remote,
                      po->srcmac, data_len);

Would a new ioctl(PPPOEIOCSSRCMAC) to pppoe be acceptable?

 Jocke

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ