Rami Rosen | 5 Feb 13:35
Picon

Fwd: [PATCH] [PPPOL2TP] Label unused warning when CONFIG_PROC_FS is not set.

---------- Forwarded message ----------
From: Rami Rosen <ramirose <at> gmail.com>
Date: Feb 5, 2008 2:15 PM
Subject: [PATCH] [PPPOL2TP] Label unused warning when CONFIG_PROC_FS is not set.
To: netdev <at> vger.kernel.org, jeff <at> garzik.org, linux-kernel <at> vger.kernel.org

Hi,

When CONFIG_PROC_FS is not set and CONFIG_PPPOL2TP is set,
we have the following warning in build:
  drivers/net/pppol2tp.c: In function 'pppol2tp_init':
  drivers/net/pppol2tp.c:2472: warning: label
'out_unregister_pppox_proto' defined but not used

This patch fixes this warning by adding appropriate #ifdef.

Regards,
Rami Rosen

Signed-off-by: Rami Rosen <ramirose <at> gmail.com>
diff --git a/drivers/net/pppol2tp.c b/drivers/net/pppol2tp.c
index 1b51bb6..5aa0a80 100644
--- a/drivers/net/pppol2tp.c
+++ b/drivers/net/pppol2tp.c
@@ -2468,9 +2468,10 @@ static int __init pppol2tp_init(void)

 out:
 	return err;
(Continue reading)

bfc | 13 Feb 22:46
Picon
Favicon

if-up et al script relocation


Is it possible to relocat the if-up, if-down, auth-up... scripts to somewhere
other than
/etc/ppp.  We'd like to use our custom scripts for our app w/o interfering
with any
customer use of PPP.

If that's not possible, is it possible to have some variant of if-up and
friends for only particular
ttyname -- the Doc shows an alternate options file for a particular ttyname,
but not the rest
of the stuff.  (OR... if there was a magic option to plant the default
scripts elsewhere.)

Thanks!
--

-- 
View this message in context: http://www.nabble.com/if-up-et-al-script-relocation-tp15468731p15468731.html
Sent from the linux-ppp mailing list archive at Nabble.com.

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

James Cameron | 13 Feb 23:20
Picon
Favicon

Re: if-up et al script relocation

You can relocate them by producing a custom build of pppd with a changed
value for the _PATH_IPUP define in pathnames.h.

You can also write a plug-in for your application that uses the
ip_up_hook() to call your own script using ipcp_script().  Plugins are
selected by pppd options.

Debian carries a patch to pppd that iterates through each script in
/etc/ppp/if-up.d ... this can also be found in Ubuntu ... it is made
more useful setting ipparam on the pppd options, and testing the value
within the scripts.

--

-- 
James Cameron                         http://quozl.netrek.org/
HP Open Source, Volunteer             http://opensource.hp.com/
PPTP Client Project, Release Engineer http://pptpclient.sourceforge.net/
-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Marco d'Itri | 13 Feb 23:04
Picon
Favicon

Re: if-up et al script relocation

On Feb 13, bfc <chappaquasuite <at> yahoo.com> wrote:

> Is it possible to relocat the if-up, if-down, auth-up... scripts to somewhere
> other than
> /etc/ppp.  We'd like to use our custom scripts for our app w/o interfering
> with any
> customer use of PPP.
Debian has a patch which does this for some of the files, it should be
made more general and submitted for inclusion.

--

-- 
ciao,
Marco
-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Eugene Paskevich | 13 Feb 23:19
Picon
Gravatar

Re: if-up et al script relocation

On Wed, 13 Feb 2008 23:46:28 +0200, bfc <chappaquasuite <at> yahoo.com> wrote:

> If that's not possible, is it possible to have some variant of if-up and
> friends for only particular
> ttyname -- the Doc shows an alternate options file for a particular  
> ttyname,
> but not the rest
> of the stuff.  (OR... if there was a magic option to plant the default
> scripts elsewhere.)

Each of the scripts you mentioned is passed a tty-device as an argument,
which means you can easily put your per-tty logic into a single script.

--

-- 
Eugene Paskevich             |   *==)-----------   |     Plug me into
eugene <at> raptor.kiev.ua        |   -----------(==*   |      The Matrix
-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

bfc | 14 Feb 03:16
Picon
Favicon

Re: if-up et al script relocation


Thanks everyone.

We've been using a custom build for some time, and wanted to get away from
that.  Inertia being what it is, we let an
old version linger for too long (2.4.1?) and now need to move to 2.4.4 for
various fixes and its structureed differently enough
to cause a bit of real work.

I meant ip-up ip-down... not if-up if-down, DUH.  (I've made this mistake
repeatedly.)

The plugin is an interesting thought, though perhaps beyond the current
scope/schedule.  At least that would let us
continue moving forward as new pppd versions came out (we just follow RHEL
versions).

So I guess it comes down to customizing any existing ip-up/ip-down/auth-up
scripts (based on the tty), but I do like the thought of combining all of
our logic into one script.  That would reduce the clutter, and could look
something like a service script.
It can be a switch on the action, doing our little things based on the
arguments we need.

Thanks again for your responses!
--

-- 
View this message in context: http://www.nabble.com/if-up-et-al-script-relocation-tp15468731p15472625.html
Sent from the linux-ppp mailing list archive at Nabble.com.

-
(Continue reading)

Robert P. J. Day | 17 Feb 18:50
Picon
Gravatar

Incorrect comment about userspace in if_pppox.h


  from if_pppox.h:

...
#ifdef  __KERNEL__
#include <linux/if_ether.h>
#include <linux/if.h>
#include <linux/netdevice.h>
#include <asm/semaphore.h>
#include <linux/ppp_channel.h>
#endif /* __KERNEL__ */
#include <linux/if_pppol2tp.h>

/* For user-space programs to pick up these definitions
 * which they wouldn't get otherwise without defining __KERNEL__
 */
...

  that comment's placing in that header file is confusing, since it's
not clear *what* definitions userspace would be missing if it didn't
define __KERNEL__.  i'd be tempted to just toss that comment.

rday
--

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
    Have classroom, will lecture.

(Continue reading)

James Teh | 24 Feb 06:13
Favicon

Re: Problems with proxy arp with multiple addresses on the same interface

Hi all,

I didn't receive any response to this query, so am attaching the patch 
to this message regardless in the hope that it might be useful to someone.

This patch is largely based on the pppd BSD code by Jun-ichiro itojun 
Hagino <itojun <at> iijlab.net>.

Jamie

James Teh wrote:
> Hi all,
> 
> The Linux specific get_ether_addr() function in pppd uses ioctl to get 
> the netmask for an interface by interface name. Unfortunately, using the 
> ip command, multiple addresses don't receive separate interface labels, 
> which means that get_ether_addr() can only ever obtain the netmask for 
> the first address on each in terface. This causes proxy arp to fail in 
> certain cases when there are multiple addresses on the interface in 
> question; specifically, when the subnet mask of the first address on the 
> interface is smaller than the netmask of the desired address.
> 
> This can be worked around by using ip with the "label" parameter to 
> label each interface separately, but this is undesirable, as it means 
> unique labels need to be generated.
> 
> I have created a patch (largely borrowed from BSD) which uses 
> getifaddrs() instead of get_ether_addr() to get the netmask. This way, 
> the netmask for the specific address of the interface can be obtained.
> 
(Continue reading)


Gmane