Commit 7e3463a8 authored by Pavel Emelyanov's avatar Pavel Emelyanov

packet: Add PACKET_COPY_THRESH into dump/restore

No test for it, sorry :( There's no easy way to check it works.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent fb5a5671
......@@ -18,4 +18,5 @@ message packet_sock_entry {
required bool vnet_hdr = 12;
required bool loss = 13;
required uint32 timestamp = 14;
required uint32 copy_thresh = 15;
}
......@@ -61,6 +61,7 @@ static int dump_one_packet_fd(int lfd, u32 id, const struct fd_parms *p)
psk.version = sd->nli.pdi_version;
psk.reserve = sd->nli.pdi_reserve;
psk.timestamp = sd->nli.pdi_tstamp;
psk.copy_thresh = sd->nli.pdi_copy_thresh;
psk.aux_data = (sd->nli.pdi_flags & PDI_AUXDATA ? true : false);
psk.orig_dev = (sd->nli.pdi_flags & PDI_ORIGDEV ? true : false);
psk.vnet_hdr = (sd->nli.pdi_flags & PDI_VNETHDR ? true : false);
......@@ -142,6 +143,9 @@ static int open_packet_sk(struct file_desc *d)
if (restore_opt(sk, SOL_PACKET, PACKET_TIMESTAMP, &pse->timestamp))
goto err_cl;
if (restore_opt(sk, SOL_PACKET, PACKET_COPY_THRESH, &pse->copy_thresh))
goto err_cl;
if (pse->aux_data) {
yes = 1;
if (restore_opt(sk, SOL_PACKET, PACKET_AUXDATA, &yes))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment