* Modifies existing table. * * Request: [ ipfw_obj_header ipfw_xtable_info ] * * Returns 0 on success. */
| 570 | * Returns 0 on success. |
| 571 | */ |
| 572 | static int |
| 573 | table_do_modify(ipfw_obj_header *oh, ipfw_xtable_info *i) |
| 574 | { |
| 575 | char tbuf[sizeof(ipfw_obj_header) + sizeof(ipfw_xtable_info)]; |
| 576 | int error; |
| 577 | |
| 578 | memcpy(tbuf, oh, sizeof(*oh)); |
| 579 | memcpy(tbuf + sizeof(*oh), i, sizeof(*i)); |
| 580 | oh = (ipfw_obj_header *)tbuf; |
| 581 | |
| 582 | error = do_set3(IP_FW_TABLE_XMODIFY, &oh->opheader, sizeof(tbuf)); |
| 583 | |
| 584 | return (error); |
| 585 | } |
| 586 | |
| 587 | /* |
| 588 | * Locks or unlocks given table |
no test coverage detected