miniupnp.tuxfamily.org Forum Index miniupnp.tuxfamily.org
The forum about miniupnp and libnatpmp
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Can miniupnpd communicate to other subnet devices?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Bugs
View previous topic :: View next topic  
Author Message
Malay



Joined: 11 May 2013
Posts: 16
Location: Anand

PostPosted: Fri May 17, 2013 7:04 am    Post subject: Can miniupnpd communicate to other subnet devices? Reply with quote

Can miniupnpd communicate to other subnet devices?

Right now it is giving me following warning:
SSDP packet sender %s not from a LAN, ignoring

Actually I have assigned the IPv4LL address to my device using avahi. Now my PC has IPv4 address. And in my PC the upnp of my device is not getting discovered. I can ping the device from my PC.

I have removed "if(lan_addr == NULL)" this check which was generating this warning but still I can not see device entry on my PC.

How can I resolve this issue?

Thank you.
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Fri May 17, 2013 4:15 pm    Post subject: Reply with quote

Nobody can help you if you don't give more details :
configuration of your network (IP addresses, mask, etc.)
and configuration of miniupnpd
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
Malay



Joined: 11 May 2013
Posts: 16
Location: Anand

PostPosted: Sat May 18, 2013 3:47 am    Post subject: The details of the network. Reply with quote

The details of the network:

[b]The device details:[/b]
IP Address : 169.254.xxx.xxx
SubNet Mask : 255.255.0.0

[b]The Outer Network(For example My PC)[/b]
(Static)IP Address : 192.168.0.133
SubNet Mask : 255.255.255.0

[b]UPNP Configuration:[/b]
ext_ifname=br0
port=0
enable_upnp=yes
bitrate_up=1000000
bitrate_down=10000000
secure_mode=yes
system_uptime=yes
notify_interval=30
clean_ruleset_interval=600
uuid=fb1e5c36-2e31-4947-831d-cb836d0b0f2b
serial=000123456789
ext_ip=169.254.2.72
listening_ip=169.254.2.72

In the original miniupnpd I have made some changes.[b] I have removed the code which is accessing iptables and nfnetlink.[/b] Because I am using it for broadcasting the services. Based on that I will commit certain action and give response. I will prepare the SSDP query like M-SEARCH. But it is another topic.

I kindly request you that please tell me if any other information is needed.
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Sun May 19, 2013 9:25 pm    Post subject: Reply with quote

Code:
ext_ifname=br0
[...]
ext_ip=169.254.2.72
listening_ip=169.254.2.72

looks like there is an inconsistency here.

Don't use set both ext_ifname and ext_ip options at the same time (unless this network interface has several ip addresses...)
Also ext_ip and listening_ip having both the same values has no sense...
If your LAN is 192.168.0.133/24 you should have listening_ip=192.168.0.133/24 or else the UPnP services will not be visible.
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
Malay



Joined: 11 May 2013
Posts: 16
Location: Anand

PostPosted: Mon May 20, 2013 5:16 am    Post subject: Thank you. Reply with quote

Thank you very much. I will remove the inconsistency of external interface(ext_ifname) and external IP(ext_ip).

Question:
1. The listening IP is not fixed. Because user can have his PC in any subnet. I have given 192.168.0.133/24 as an example. But the device IP address range is fixed it will be IPv4LL addresses assigned by avahi. So how would I set the listening_ip to miniupnpd.conf? Should I write the range of IP addresses?
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Mon May 20, 2013 10:03 am    Post subject: Re: Thank you. Reply with quote

Malay wrote:

1. The listening IP is not fixed. Because user can have his PC in any subnet. I have given 192.168.0.133/24 as an example. But the device IP address range is fixed it will be IPv4LL addresses assigned by avahi. So how would I set the listening_ip to miniupnpd.conf? Should I write the range of IP addresses?

you now can specify the ethernet interface instead.
listening_ip=eth0
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
Malay



Joined: 11 May 2013
Posts: 16
Location: Anand

PostPosted: Mon May 20, 2013 10:14 am    Post subject: Thank you. Reply with quote

Thank you. I will give a try to that. And I will reply after that.
Back to top
View user's profile Send private message
Malay



Joined: 11 May 2013
Posts: 16
Location: Anand

PostPosted: Fri May 31, 2013 10:07 am    Post subject: I have not given a try to this suggestion yet. Reply with quote

I have not given a try to this suggestion yet. Because I was adding other features using miniupnpd. I am really sorry for that.

Quote:

miniupnpd is worked well for me and best suited for our product's features. I have used SOAP requests for giving commands and receiving responses. It is fantastic. Smile


I am also working on giving support of IPv6 to miniupnpd. I have tried that by changing config.h header file. But it is giving me following errors:

Code:
mips-linux-uclibc-gcc -Os -fno-strict-aliasing -fno-common -D_GNU_SOURCE -Wall -Wextra -Wstrict-prototypes -Wdeclaration-after-statement -DIPTABLES_143   -c -o getifaddr.o getifaddr.c
getifaddr.c:25:21: error: ifaddrs.h: No such file or directory
getifaddr.c: In function 'find_ipv6_addr':
getifaddr.c:131: warning: implicit declaration of function 'getifaddrs'
getifaddr.c:136: error: dereferencing pointer to incomplete type
getifaddr.c:139: error: dereferencing pointer to incomplete type
getifaddr.c:141: error: dereferencing pointer to incomplete type
getifaddr.c:143: error: dereferencing pointer to incomplete type
getifaddr.c:145: error: dereferencing pointer to incomplete type
getifaddr.c:149: error: dereferencing pointer to incomplete type
getifaddr.c:158: warning: implicit declaration of function 'freeifaddrs'
make: *** [getifaddr.o] Error 1


What am I missing in cross compiling with ipv6 support? Would you please help me in this?

Please tell me if more information is needed.
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Fri May 31, 2013 10:42 am    Post subject: Reply with quote

RTFM : man getifaddrs
miniupnpd does require getifaddrs() / freeifaddrs() if compiled with IPv6 support. Please check theses API are available in your SDK/system libraries.
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
Malay



Joined: 11 May 2013
Posts: 16
Location: Anand

PostPosted: Fri May 31, 2013 1:11 pm    Post subject: ok. Thank you. Reply with quote

ok. Thank you. I will check that out.
Back to top
View user's profile Send private message
Malay



Joined: 11 May 2013
Posts: 16
Location: Anand

PostPosted: Sat Jun 01, 2013 4:05 pm    Post subject: Question regarding ext_ip and listening_ip. Reply with quote

Hi,

As per the suggestion I should not write ext_ifname and ext_ip both at the same time. So I have removed ext_ip from my configuration.

The IP address of the device in which the miniupnp is going to run is
Code:
192.168.0.140

So now what will be my configuration file entries so that miniupnd will not give any runtime errors?:
Code:

ext_ifname=br0
listening_ip=?


Temporary I have given
Code:
listening_ip=192.168.0.2/16

But it is showing me following warnings/errors:
Code:


1970-01-01 00:00:42 [Notice] miniupnpd[671]: HTTP listening on port 47341
1970-01-01 00:00:42 [Error] miniupnpd[671]: setsockopt(udp, IP_ADD_MEMBERSHIP): No such device
1970-01-01 00:00:42 [Warning] miniupnpd[671]: Failed to add multicast membership for interface 192.168.0.2
1970-01-01 00:00:42 [Error] miniupnpd[671]: setsockopt(udp_notify, IP_MULTICAST_IF): Cannot assign requested address


I really appreciate your help. Thank you.
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Sun Jun 02, 2013 8:45 pm    Post subject: Reply with quote

I think you really need to use only inteface names in the configuration, just like I have written previously.
Code:
ext_ifname="outer network interface"
listening_ip="LAN inteface"

For example :
Code:
ext_ifname=br0
listening_ip=br1

Please read my former messages before asking the same question again and again.

the error messages are really understandable :
Code:
1970-01-01 00:00:42 [Warning] miniupnpd[671]: Failed to add multicast membership for interface 192.168.0.2

What more precise explanation can I give you ?
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
Malay



Joined: 11 May 2013
Posts: 16
Location: Anand

PostPosted: Tue Jun 04, 2013 4:07 am    Post subject: Thank you. Reply with quote

Thank you. I have configured the miniupnpd.conf file in proper way. So I am not getting this error. I have worked as per your guidance. Now it is working for different subnets.
Back to top
View user's profile Send private message
Malay



Joined: 11 May 2013
Posts: 16
Location: Anand

PostPosted: Tue Jun 04, 2013 4:10 am    Post subject: Details about my case. Reply with quote

I don't have a different external interface and internal interface. We have the device in bridge mode. So It is a kind of smart switch. Incoming and outgoing packets comes on the same interface. So I have edited and put "br0" for the both.
Back to top
View user's profile Send private message
Malay



Joined: 11 May 2013
Posts: 16
Location: Anand

PostPosted: Tue Jun 04, 2013 5:37 am    Post subject: IP address is changed while miniupnpd is running. Reply with quote

IP address is changed while miniupnpd is running.

Scenario:

1. The device is in DHCP mode. DHCP server is not running. So avahi will give the IP address to interface.
2. miniupnpd is started.
3. Now user started the DHCP server so device will get the new IP address from the server.
I am getting following error:
Code:
[Error] miniupnpd[1141]: sendto(udp_notify=6, 169.254.2.62): Invalid argument


I found that this error is caused when miniupnp tries to send notify. The sockets are already created.The only way which I found is to restart the process. I can exit from the process whenever I get this error and watchdog will start it again.
Is there any other way so that miniupnp will work even if IP address is changed? Should I have to recreate the sockets?
Thank you for helping me. Please ignore this question if it is proper behavior.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Bugs All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP
© 2007 Thomas Bernard, author of MiniUPNP.