jsonrpc-cpp-devel Mailing List for JsonRpc-Cpp
Brought to you by:
s-vincent
You can subscribe to this list here.
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
(1) |
Nov
(1) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2010 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(2) |
Aug
(5) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
| 2012 |
Jan
(3) |
Feb
(9) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
(4) |
| 2013 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
(2) |
Oct
|
Nov
(2) |
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
1
|
2
|
3
|
4
|
5
|
|
6
|
7
|
8
|
9
|
10
|
11
|
12
|
|
13
|
14
|
15
|
16
|
17
|
18
(2) |
19
|
|
20
|
21
|
22
|
23
|
24
|
25
|
26
|
|
27
|
28
|
29
|
30
|
31
|
|
|
|
From: Peter Spiess-K. <de...@sp...> - 2015-12-18 08:17:34
|
Hi Anoop! On 12/18/2015 08:01 AM, Anoop Ravi wrote: > Hi, > > > > I could find a bug in jsonrpc-cpp module while trying to adopt > ipv6 capability to my application. I tried to bind my server application > to all ip addresses (ipv4 and v6 at the same time) using “::”. I found a > comment line in “src/networking.cpp” which says “accept IPv6 OR IPv4 on > the same socket”. As the comment says, the server socket should accept > both V4 and V6 in the same socket. So I tried to communicate to my > server application using its IPV4 address, It didn’t work while > connecting with its V6 counterpart was working. > > The TCP implementation was kind of prototype. That's why it is still on the develop branch. It is contributed code by a third-party. I also detected lots of flaws in it and probably I will remove it again, until I have the time to give it a deep review and fix the bugs. > > This made me peek into networking.cpp source code to see the > socket options. In “setsockopt()”, a parameter decides the flexibility > of the socket to accept both ip versions or not. > > > > /on = 1; / > > /setsockopt//(//sock//,// IPPROTO_IPV6//,//IPV6_V6ONLY//,// //&//on//,// //sizeof//(//on//));/// > > > > Here the variable is set to value ‘1’, which doesn’t allow both ip > versions simultaneously. This contradicts with the comment given there. > > > > /on //=// //0//;/ > > /setsockopt//(//sock//,// IPPROTO_IPV6//,//IPV6_V6ONLY//,// //&//on//,// //sizeof//(//on//));/// > > > > Instead its value should be ‘0’. Modifying this value made my > application work as expected. > > Thanks for taking the time reporting this. > > I think this is a bug in the implementation. I couldn’t find any > bugzilla or other bug tracking tools. Hence posting it here. > > The library is officially maintained at Github. If you refuse to sign-up on GitHub (which I would totally understand), you can always post your findings here on the mailing list. https://github.com/cinemast/libjson-rpc-cpp > > Best Regards, > > Anoop Ravi > > Greetings Peter |
|
From: Anoop R. <ano...@gm...> - 2015-12-18 07:01:58
|
Hi,
I could find a bug in jsonrpc-cpp module while trying to adopt ipv6 capability to my application. I tried to bind my server application to all ip addresses (ipv4 and v6 at the same time) using “::”. I found a comment line in “src/networking.cpp” which says “accept IPv6 OR IPv4 on the same socket”. As the comment says, the server socket should accept both V4 and V6 in the same socket. So I tried to communicate to my server application using its IPV4 address, It didn’t work while connecting with its V6 counterpart was working.
This made me peek into networking.cpp source code to see the socket options. In “setsockopt()”, a parameter decides the flexibility of the socket to accept both ip versions or not.
on = 1;
setsockopt(sock, IPPROTO_IPV6,IPV6_V6ONLY, &on, sizeof(on));
Here the variable is set to value ‘1’, which doesn’t allow both ip versions simultaneously. This contradicts with the comment given there.
on = 0;
setsockopt(sock, IPPROTO_IPV6,IPV6_V6ONLY, &on, sizeof(on));
Instead its value should be ‘0’. Modifying this value made my application work as expected.
I think this is a bug in the implementation. I couldn’t find any bugzilla or other bug tracking tools. Hence posting it here.
Best Regards,
Anoop Ravi
|