int error;
/* Dissect the message. */
- ofm = ofpbuf_try_pull(&b, sizeof *ofm);
- if (!ofm) {
- return ofp_mkerr(OFPET_BAD_REQUEST, OFPBRC_BAD_LEN);
- }
+ ofm = ofpbuf_pull(&b, sizeof *ofm);
error = ofputil_pull_actions(&b, b.size, &fm->actions, &fm->n_actions);
if (error) {
return error;
int error;
/* Dissect the message. */
- nfm = ofpbuf_try_pull(&b, sizeof *nfm);
- if (!nfm) {
- return ofp_mkerr(OFPET_BAD_REQUEST, OFPBRC_BAD_LEN);
- }
+ nfm = ofpbuf_pull(&b, sizeof *nfm);
error = nx_pull_match(&b, ntohs(nfm->match_len), ntohs(nfm->priority),
&fm->cr);
if (error) {
ofpbuf_use_const(&b, oh, ntohs(oh->length));
- nfsr = ofpbuf_try_pull(&b, sizeof *nfsr);
- if (!nfsr) {
- return ofp_mkerr(OFPET_BAD_REQUEST, OFPBRC_BAD_LEN);
- }
+ nfsr = ofpbuf_pull(&b, sizeof *nfsr);
error = nx_pull_match(&b, ntohs(nfsr->match_len), 0, &fsr->match);
if (error) {
return error;
/* Get ofp_packet_out. */
ofpbuf_use_const(&request, oh, ntohs(oh->length));
- opo = ofpbuf_try_pull(&request, offsetof(struct ofp_packet_out, actions));
- if (!opo) {
- return ofp_mkerr(OFPET_BAD_REQUEST, OFPBRC_BAD_LEN);
- }
+ opo = ofpbuf_pull(&request, offsetof(struct ofp_packet_out, actions));
/* Get actions. */
error = ofputil_pull_actions(&request, ntohs(opo->actions_len),
ofpbuf_use_const(&b, oh, ntohs(oh->length));
/* Dissect the message. */
- nfsr = ofpbuf_try_pull(&b, sizeof *nfsr);
- if (!nfsr) {
- return ofp_mkerr(OFPET_BAD_REQUEST, OFPBRC_BAD_LEN);
- }
+ nfsr = ofpbuf_pull(&b, sizeof *nfsr);
error = nx_pull_match(&b, ntohs(nfsr->match_len), 0, &target);
if (error) {
return error;
ofpbuf_use_const(&b, oh, ntohs(oh->length));
/* Dissect the message. */
- request = ofpbuf_try_pull(&b, sizeof *request);
- if (!request) {
- return ofp_mkerr(OFPET_BAD_REQUEST, OFPBRC_BAD_LEN);
- }
+ request = ofpbuf_pull(&b, sizeof *request);
error = nx_pull_match(&b, ntohs(request->match_len), 0, &target);
if (error) {
return error;