Marcelo Moreira | 25 Apr 2012 22:48
Picon
Gravatar

Support to configure TAP interface MAC address

Hi,

I have made a patch to version 0.5.3 to add support to configure the interface MAC address (for the case when a TAP interface is selected).
My motivations were:
  1. enable IP address static assignment based on MAC address (for this purpose the MAC address must be fixed, and not changed for each new connection);
  2. avoid network traffic being filtered by firewalls that apply MAC filtering rules.
I have successfully tested this code in Ubuntu (kernel 2.6.35-28-generic) and CentOS (kernel 2.6.18-238.el5xen) operating systems.

It would be nice if you could integrate this patch in the next release.

Regards,
Marcelo Moreira

Attachment (vpnc-0.5.3-macaddr-support.patch): application/octet-stream, 2264 bytes
<div><div class="gmail_extra">
<div class="gmail_quote">Hi,<div><br></div>
<div>I have made a patch to version 0.5.3 to add support to configure the interface MAC address (for the case when a TAP interface is selected).</div>
<div>
My motivations were:</div>
<div>
<ol>
<li>enable IP address static assignment based on MAC address (for this purpose the MAC address must be fixed, and not changed for each new connection);</li>
<li>avoid network traffic being filtered by firewalls that apply MAC filtering rules.</li>
</ol>
<div>I have successfully tested this code in Ubuntu (kernel 2.6.35-28-generic) and CentOS (kernel&nbsp;2.6.18-238.el5xen) operating systems.</div>

</div>
<div><br></div>
<div>It would be nice if you could integrate this patch in the next release.</div>
<div><br></div>
<div>Regards,</div>
<div>Marcelo Moreira</div>
</div>
<br>
</div></div>
Antonio Borneo | 26 Apr 2012 01:07
Picon
Gravatar

Re: Support to configure TAP interface MAC address

On Thu, Apr 26, 2012 at 4:48 AM, Marcelo Moreira
<marceloddm@...> wrote:
> Hi,
>
> I have made a patch to version 0.5.3 to add support to configure the
> interface MAC address (for the case when a TAP interface is selected).
> My motivations were:
>
> enable IP address static assignment based on MAC address (for this purpose
> the MAC address must be fixed, and not changed for each new connection);
> avoid network traffic being filtered by firewalls that apply MAC filtering
> rules.

Hi Marcelo,

thanks for your patch.

> I have successfully tested this code in Ubuntu (kernel 2.6.35-28-generic)
> and CentOS (kernelĀ 2.6.18-238.el5xen) operating systems.

Do you have more info on the version of vpnc where your patch applies?
0.5.3 is latest release, but quite old.
Could you check if it applies to trunk code in svn?

Also, please provide the patch as
  "diff -urp vpnc-0.5.3/ vpnc-0.5.3-macaddr-support/"

In your code, if user specifies a MAC address, he/she expect this is
set on the interface.
But the platform could provide no support for SIOCSIFHWADDR.
I would expect an error message or at least a warning in this case.

I'm not sure, but I would also expect an error if user specifies both
MAC and TAP.
This should be detected directly in config.c

> It would be nice if you could integrate this patch in the next release.

Agree!

Best Regards
Antonio

Gmane