[Olsr-dev] [PATCH] olsrd Fix listen on ip6 only in jsoninfo
Ferry Huberts
(spam-protected)
Thu Jul 10 12:39:28 CEST 2014
On 10/07/14 12:33, Henning Rogge wrote:
> I am okay with this patch, any thoughts from you Ferry?
>
I'm ok under the assumption that Patrick did test it. Did you Patrick?
I'm currently running the build to see if nothing breaks.
Patrick, can you mail a git patch to the list, with your full name
configured in git (so not just your first name)?
> Henning
>
> On Thu, Jul 10, 2014 at 12:25 AM, Patrick <(spam-protected)> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Hi
>>
>> I cant start 2 process of olsrd with ip6 and ip4.
>> The ip6 process is listen on ip4 tcp port 9090.
>>
>> I'm not sure if this the right places to do this.
>>
>> diff --git a/lib/jsoninfo/src/olsrd_jsoninfo.c b/lib/jsoninfo/src/olsrd_jsoninfo.c
>> index d86fa88..0db7609 100644
>> - --- a/lib/jsoninfo/src/olsrd_jsoninfo.c
>> +++ b/lib/jsoninfo/src/olsrd_jsoninfo.c
>> @@ -385,6 +385,14 @@ plugin_ipc_init(void)
>> return 0;
>> }
>> #endif /* (defined __FreeBSD__ || defined __FreeBSD_kernel__) && defined SO_NOSIGPIPE */
>> +#if defined linux
>> + if (olsr_cnf->ip_version == AF_INET6) {
>> + if (setsockopt(ipc_socket, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&yes, sizeof(yes)) < 0) {
>> + perror("IPV6_V6ONLY failed");
>> + return 0;
>> + }
>> + }
>> +#endif /* defined linux */
>> /* Bind the socket */
>>
>> /* complete the socket structure */
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
>> Comment: GPGTools - http://gpgtools.org
>> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>>
>> iEYEARECAAYFAlO9wWUACgkQr9m0OkMZoqStSACgwfGiZLiOiCI5kPYQDqdfX+Jf
>> dGEAoOsOrA4jUx/SzfXC+qs+9DZJgrzc
>> =6lKr
>> -----END PGP SIGNATURE-----
>>
>> --
>> Olsr-dev mailing list
>> (spam-protected)
>> https://lists.olsr.org/mailman/listinfo/olsr-dev
--
Ferry Huberts
More information about the Olsr-dev
mailing list