Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

whna: support multiple HNAs #2

Open
cl4u2 opened this issue Jul 5, 2012 · 0 comments
Open

whna: support multiple HNAs #2

cl4u2 opened this issue Jul 5, 2012 · 0 comments

Comments

@cl4u2
Copy link
Member

cl4u2 commented Jul 5, 2012

At the moment only one HNA can be specified.
To specify N different HNAs the configuration could look like this:

LoadPlugin "olsrd_whna.so.0.1"
{
PlParam "WHna4" "10.1.1.0 10.2.2.0 10.3.3.0"
PlParam "WHna4Netmask" "255.255.255.0 255.255.255.0 255.255.0.0"
PlParam "WHnaTargetETX" "1.8 1.0 1.5"
PlParam "WHnaFakeNodeAddress" "192.168.101.111 192.168.101.222 192.168.101.333"
}

also for IPv6

zioproto pushed a commit that referenced this issue Nov 15, 2012
Coverity:
CID 739662 (#2 of 2): Argument cannot be negative (NEGATIVE_RETURNS)
At (9): "fd" is passed to a parameter that cannot be negative.

Signed-off-by: Ferry Huberts <[email protected]>
zioproto pushed a commit that referenced this issue Nov 15, 2012
Coverity:
CID 739663 (#2 of 2): Argument cannot be negative (NEGATIVE_RETURNS)
At (8): "fd" is passed to a parameter that cannot be negative.

Signed-off-by: Ferry Huberts <[email protected]>
zioproto pushed a commit that referenced this issue Nov 15, 2012
    Coverity:

    CID 739610 (#1 of 1): Incorrect sizeof expression (BAD_SIZEOF)
    Taking the size of pointer parameter "lower_border_ip" is suspicious.

    CID 739611 (#1 of 1): Incorrect sizeof expression (BAD_SIZEOF)
    Taking the size of pointer parameter "upper_border_ip" is suspicious.

    CID 739692 (#1 of 2): Wrong sizeof argument (SIZEOF_MISMATCH)
    Passing argument "lower_border_ip" of type "union olsr_ip_addr *" and argument "8UL /* sizeof (lower_border_ip) */" to function "memset(void *, int, size_t)" is suspicious. Did you intend to use "sizeof(*lower_border_ip)" instead of "sizeof (lower_border_ip)" ?

    CID 739692 (#2 of 2): Wrong sizeof argument (SIZEOF_MISMATCH)
    Passing argument "upper_border_ip" of type "union olsr_ip_addr *" and argument "8UL /* sizeof (upper_border_ip) */" to function "memset(void *, int, size_t)" is suspicious. Did you intend to use "sizeof(*upper_border_ip)" instead of "sizeof (upper_border_ip)" ?

    Signed-off-by: Henning Rogge <[email protected]>
zioproto pushed a commit that referenced this issue Nov 15, 2012
    Coverity:

    CID 739613 (#1 of 1): Buffer not null terminated (BUFFER_SIZE_WARNING)
    At (6): Calling strncpy with a maximum size argument of 16 bytes on destination array "t->if_name" of size 16 bytes might leave the destination string unterminated.

    CID 739614 (#1 of 3): Buffer not null terminated (BUFFER_SIZE_WARNING)
    At (4): Calling strncpy with a maximum size argument of 16 bytes on destination array "p4.name" of size 16 bytes might leave the destination string unterminated.

    CID 739614 (#2 of 3): Buffer not null terminated (BUFFER_SIZE_WARNING)
    At (4): Calling strncpy with a maximum size argument of 16 bytes on destination array "p6.name" of size 16 bytes might leave the destination string unterminated.

    CID 739614 (#3 of 3): Buffer not null terminated (BUFFER_SIZE_WARNING)
    At (5): Calling strncpy with a maximum size argument of 16 bytes on destination array "ifr.ifr_ifrn.ifrn_name" of size 16 bytes might leave the destination string unterminated.

    Signed-off-by: Henning Rogge <[email protected]>
zioproto pushed a commit that referenced this issue Nov 15, 2012
Coverity:
CID 739616 (#1 of 2): Unchecked return value (CHECKED_RETURN)
At (8): Calling function "inet_pton(int, char const * restrict,
                                    void * restrict)" without checking
        return value (as is done elsewhere 23 out of 25 times).
At (9): No check of the return value of "inet_pton(2, "224.0.0.2",
        &mc_settings.imr_multiaddr.s_addr)".

CID 739616 (#2 of 2): Unchecked return value (CHECKED_RETURN)
At (7): Calling function "inet_pton(int, char const * restrict,
                                    void * restrict)" without checking
        return value (as is done elsewhere 23 out of 25 times).
At (8): No check of the return value of "inet_pton(10, "ff02::2",
        &mc6_settings.ipv6mr_multiaddr.__in6_u.__u6_addr8)".

Signed-off-by: Ferry Huberts <[email protected]>
zioproto pushed a commit that referenced this issue Nov 15, 2012
Coverity:
CID 739617 (#1 of 1): Unchecked return value (CHECKED_RETURN)
At (7): Calling function "sendto(walker->helloSkfd, (char const *)hello,
        25UL, 0, (struct sockaddr *)&dest, 16U)" without checking return
        value. This library function may fail and return an error code.
At (8): No check of the return value of "sendto(walker->helloSkfd, (
        char const *)hello, 25UL, 0, (struct sockaddr *)&dest, 16U)".

CID 739617 (#2 of 2): Unchecked return value (CHECKED_RETURN)
At (7): Calling function "sendto(walker->helloSkfd, (char const *)hello,
        25UL, 0, (struct sockaddr *)&dest6, 28U)" without checking
        return value. This library function may fail and return an error
        code.
At (8): No check of the return value of "sendto(walker->helloSkfd, (
        char const *)hello, 25UL, 0, (struct sockaddr *)&dest6, 28U)".

Signed-off-by: Ferry Huberts <[email protected]>
zioproto pushed a commit that referenced this issue Nov 15, 2012
CID 739656 (#1 of 4): Argument cannot be negative (NEGATIVE_RETURNS)
At (7): "encapsulatingSkfd" is passed to a parameter that cannot be
        negative.
CID 739656 (#2 of 4): Argument cannot be negative (NEGATIVE_RETURNS)
At (9): "encapsulatingSkfd" is passed to a parameter that cannot be
        negative.
CID 739656 (#3 of 4): Argument cannot be negative (NEGATIVE_RETURNS)
At (12): "capturingSkfd" is passed to a parameter that cannot be
         negative.
CID 739656 (#4 of 4): Argument cannot be negative (NEGATIVE_RETURNS)
At (11): "encapsulatingSkfd" is passed to a parameter that cannot be
         negative.

Signed-off-by: Ferry Huberts <[email protected]>
zioproto pushed a commit that referenced this issue Nov 15, 2012
Coverity:
CID 739682 (#1 of 2): Resource leak (RESOURCE_LEAK)
At (84): Variable "in" going out of scope leaks the storage it points to.
CID 739682 (#2 of 2): Resource leak (RESOURCE_LEAK)
At (89): Variable "in" going out of scope leaks the storage it points to.

Signed-off-by: Ferry Huberts <[email protected]>
zioproto pushed a commit that referenced this issue Feb 20, 2013
CID 739626 (#1 of 2): Operands don't affect result (CONSTANT_EXPRESSION_RESULT)
CID 739626 (#2 of 2): Operands don't affect result (CONSTANT_EXPRESSION_RESULT)
gabri94 pushed a commit to gabri94/olsrd that referenced this issue Apr 28, 2016
==12076==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 7 byte(s) in 1 object(s) allocated from:
    #0 0x499bba in __interceptor_malloc (/home/ferry/vcs/nbs/nbsolsrd/olsrd+0x499bba)
    ninuxorg#1 0x5784cd in get_string_token src/cfgparser/oscan.lex:92
    ninuxorg#2 0x578ef7 in yylex src/cfgparser/oscan.lex:185
    ninuxorg#3 0x5699c4 in yyparse src/cfgparser/oparse.c:1686
    ninuxorg#4 0x55e322 in olsrd_parse_cnf src/cfgparser/olsrd_conf.c:158
    ninuxorg#5 0x4edf56 in olsrmain_load_config src/main.c:281
    ninuxorg#6 0x4ee5e6 in main src/main.c:386
    #7 0x7fd24079757f in __libc_start_main (/lib64/libc.so.6+0x2057f)

SUMMARY: AddressSanitizer: 7 byte(s) leaked in 1 allocation(s).

Signed-off-by: Ferry Huberts <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant