diff mbox

[ovs-dev] netlink-notifier: change message to a less scary one

Message ID 1466192003-23620-1-git-send-email-cascardo@redhat.com
State Accepted
Headers show

Commit Message

Thadeu Lima de Souza Cascardo June 17, 2016, 7:33 p.m. UTC
"received bad netlink message" may be interpreted as a corrupt netlink message.
However, the parse functions may return failure when the message contains
unexpected attributes or misses non optional attributes. Indicating the message
contained "unexpected contents" will avoid some interpretation that there may be
some netlink message corruption.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Cc: Aaron Conole <aconole@redhat.com>
---
 lib/netlink-notifier.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Aaron Conole June 17, 2016, 7:39 p.m. UTC | #1
Thadeu Lima de Souza Cascardo <cascardo@redhat.com> writes:

> "received bad netlink message" may be interpreted as a corrupt netlink message.
> However, the parse functions may return failure when the message contains
> unexpected attributes or misses non optional attributes. Indicating the message
> contained "unexpected contents" will avoid some interpretation that there may be
> some netlink message corruption.
>
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
> Cc: Aaron Conole <aconole@redhat.com>
> ---
>  lib/netlink-notifier.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/netlink-notifier.c b/lib/netlink-notifier.c
> index f6d1e4d..0867952 100644
> --- a/lib/netlink-notifier.c
> +++ b/lib/netlink-notifier.c
> @@ -194,7 +194,7 @@ nln_run(struct nln *nln)
>              if (group != 0) {
>                  nln_report(nln, nln->change, group);
>              } else {
> -                VLOG_WARN_RL(&rl, "received bad netlink message");
> +                VLOG_WARN_RL(&rl, "unexpected netlink message contents");
>                  nln_report(nln, NULL, 0);
>              }
>              ofpbuf_uninit(&buf);

LGTM
Ben Pfaff June 23, 2016, 9:58 p.m. UTC | #2
On Fri, Jun 17, 2016 at 04:33:23PM -0300, Thadeu Lima de Souza Cascardo wrote:
> "received bad netlink message" may be interpreted as a corrupt netlink message.
> However, the parse functions may return failure when the message contains
> unexpected attributes or misses non optional attributes. Indicating the message
> contained "unexpected contents" will avoid some interpretation that there may be
> some netlink message corruption.
> 
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
> Cc: Aaron Conole <aconole@redhat.com>

Applied, thanks!
diff mbox

Patch

diff --git a/lib/netlink-notifier.c b/lib/netlink-notifier.c
index f6d1e4d..0867952 100644
--- a/lib/netlink-notifier.c
+++ b/lib/netlink-notifier.c
@@ -194,7 +194,7 @@  nln_run(struct nln *nln)
             if (group != 0) {
                 nln_report(nln, nln->change, group);
             } else {
-                VLOG_WARN_RL(&rl, "received bad netlink message");
+                VLOG_WARN_RL(&rl, "unexpected netlink message contents");
                 nln_report(nln, NULL, 0);
             }
             ofpbuf_uninit(&buf);