On 07/12/12 14:52, Jo-Philipp Wich wrote:
I have changed this to: if [ "$ACTION" = ifup ] && [ "$INTERFACE"
= lan ]; then as otherwise it seemed to be doing it to the
loopback (127.0.0.1) interface as well.
My fault, "lo" should've been "loopback".
No worries, but is there a reason for "!= loopback" rather than
"= lan"?
I still have to have a "sleep" in the script - otherwise it does
not find a valid IGD. It seems to need about ten or a bit more
seconds, but I am giving it 60 to be on the safe side.
Odd, maybe DNS takes a while to settle.
I think DNS is okay. I was wondering if it's something to do with
the clock, because it takes a while to sync in to real time.
So I made the script do this:
date >> /tmp/pnp
ping -c 1 latter.org | grep PING >> /tmp/pnp
/usr/bin/upnpc -s 2>&1 >> /tmp/pnp
date >> /tmp/pnp
sleep 3
a few times before doing anything else.
(Piping into logger doesn't seem to work for some reason).
From the the first time, ping resolves latter.org correctly.
Also, the system clock gets set to real time correctly,
before it is able to find any IGD routers.
I have two others on the network The "real" router is a Linksys,
and then there is a Netgear I am using as a wifi access point.
(The openwrt box is a TPLink).
upnpc "finds" the netgear before it is able to see the Linksys.
All very odd. I think I will stick with "sleep 60" and move on.
/usr/bin/upnpc -a "$ipaddr" 1234 1234 tcp | logger -t 90-upnpc -
Tried it - just get "-" in the log.
Another question on upnpc - when it does work, the "Application
Name" in the router's port forwarding table lists "miniupnpc". I
would like to change this to a string of my choosing (e.g.
"AskDomAboutThis" would be good...) Is this possible?
I suppose you have to recompile or binary-patch to change it.
I've been looking at the source and it is not obvious where to
change it! The actual C function seems to accept "desc" as a
parameter which is the string I want to change... I will carry on.
_______________________________________________
openwrt-users mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-users