From: Vlad Yasevich <vladislav.yasevich@hp.com>
To: linux-sctp@vger.kernel.org
Subject: Re: [PATCH] lksctp: replace sinfo_timetolive with sinfo_pr_value.
Date: Tue, 06 Jan 2009 18:20:18 +0000 [thread overview]
Message-ID: <4963A0E2.3010306@hp.com> (raw)
In-Reply-To: <1229497479-10198-1-git-send-email-hsanson@gmail.com>
Hi Horacio
Few small issues:
> @@ -2539,7 +2540,7 @@ static int sctp_setsockopt_initmsg(struct sock *sk, char __user *optval, int opt
> * in to this call the sctp_sndrcvinfo structure defined in Section
> * 5.2.2) The input parameters accepted by this call include
> * sinfo_stream, sinfo_flags, sinfo_ppid, sinfo_context,
> - * sinfo_timetolive. The user must provide the sinfo_assoc_id field in
> + * sinfo_pr_value. The user must provide the sinfo_assoc_id field in
> * to this call if the caller is using the UDP model.
> */
> static int sctp_setsockopt_default_send_param(struct sock *sk,
> @@ -2563,13 +2564,15 @@ static int sctp_setsockopt_default_send_param(struct sock *sk,
> asoc->default_flags = info.sinfo_flags;
> asoc->default_ppid = info.sinfo_ppid;
> asoc->default_context = info.sinfo_context;
> - asoc->default_timetolive = info.sinfo_timetolive;
> + asoc->default_pr_policy = info.sinfo_pr_policy;
> + asoc->default_pr_value = info.sinfo_pr_value;
> } else {
> sp->default_stream = info.sinfo_stream;
> sp->default_flags = info.sinfo_flags;
> sp->default_ppid = info.sinfo_ppid;
> sp->default_context = info.sinfo_context;
> - sp->default_timetolive = info.sinfo_timetolive;
> + sp->default_pr_policy = info.sinfo_pr_policy;
> + sp->default_pr_value = info.sinfo_pr_value;
> }
The policy value needs to be verified since we don't want to set to a garbage value.
> @@ -6107,10 +6113,13 @@ SCTP_STATIC int sctp_msghdr_parse(const struct msghdr *msg,
> (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg);
>
> /* Minimally, validate the sinfo_flags. */
> - if (cmsgs->info->sinfo_flags &
> +/*
> +if (cmsgs->info->sinfo_flags &
> ~(SCTP_UNORDERED | SCTP_ADDR_OVER |
> - SCTP_ABORT | SCTP_EOF))
> + SCTP_ABORT | SCTP_EOF | SCTP_PR_SCTP_NONE |
> + SCTP_PR_SCTP_TTL))
> return -EINVAL;
> +*/
> break;
>
> default:
Commented out block above. The sinfo_flags probably shouldn't contain _PR_
flags as it should be filled into the sinfo_pr_policy. Remember that the flags
are really needed only for interaction with sctp_sendmsg() library call.
-vlad
next prev parent reply other threads:[~2009-01-06 18:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-17 7:04 [PATCH] lksctp: replace sinfo_timetolive with sinfo_pr_value Horacio Sanson
2008-12-17 21:24 ` Vlad Yasevich
2008-12-18 10:03 ` Horacio Sanson
2008-12-18 14:32 ` Vlad Yasevich
2008-12-30 16:07 ` Horacio Sanson
2009-01-06 18:20 ` Vlad Yasevich [this message]
2009-01-09 5:31 ` Horacio Sanson
2009-01-09 14:08 ` Vlad Yasevich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4963A0E2.3010306@hp.com \
--to=vladislav.yasevich@hp.com \
--cc=linux-sctp@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.