if_tap.c (346803) | if_tap.c (347376) |
---|---|
1/*- 2 * Copyright (C) 1999-2000 by Maksim Yevmenkin <m_evmenkin@yahoo.com> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * BASED ON: 27 * ------------------------------------------------------------------------- 28 * 29 * Copyright (c) 1988, Julian Onions <jpo@cs.nott.ac.uk> 30 * Nottingham University 1987. 31 */ 32 33/* | 1/*- 2 * Copyright (C) 1999-2000 by Maksim Yevmenkin <m_evmenkin@yahoo.com> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * BASED ON: 27 * ------------------------------------------------------------------------- 28 * 29 * Copyright (c) 1988, Julian Onions <jpo@cs.nott.ac.uk> 30 * Nottingham University 1987. 31 */ 32 33/* |
34 * $FreeBSD: stable/11/sys/net/if_tap.c 346803 2019-04-28 03:51:08Z kevans $ | 34 * $FreeBSD: stable/11/sys/net/if_tap.c 347376 2019-05-09 01:16:03Z kevans $ |
35 * $Id: if_tap.c,v 0.21 2000/07/23 21:46:02 max Exp $ 36 */ 37 38#include "opt_compat.h" 39#include "opt_inet.h" 40 41#include <sys/param.h> 42#include <sys/conf.h> --- 694 unchanged lines hidden (view full) --- 737 738 switch (cmd) { 739 case TAPSIFINFO: 740 tapp = (struct tapinfo *)data; 741 if (ifp->if_type != tapp->type) 742 return (EPROTOTYPE); 743 mtx_lock(&tp->tap_mtx); 744 if (ifp->if_mtu != tapp->mtu) { | 35 * $Id: if_tap.c,v 0.21 2000/07/23 21:46:02 max Exp $ 36 */ 37 38#include "opt_compat.h" 39#include "opt_inet.h" 40 41#include <sys/param.h> 42#include <sys/conf.h> --- 694 unchanged lines hidden (view full) --- 737 738 switch (cmd) { 739 case TAPSIFINFO: 740 tapp = (struct tapinfo *)data; 741 if (ifp->if_type != tapp->type) 742 return (EPROTOTYPE); 743 mtx_lock(&tp->tap_mtx); 744 if (ifp->if_mtu != tapp->mtu) { |
745 strncpy(ifr.ifr_name, if_name(ifp), IFNAMSIZ); | 745 strlcpy(ifr.ifr_name, if_name(ifp), IFNAMSIZ); |
746 ifr.ifr_mtu = tapp->mtu; 747 CURVNET_SET(ifp->if_vnet); 748 error = ifhwioctl(SIOCSIFMTU, ifp, 749 (caddr_t)&ifr, td); 750 CURVNET_RESTORE(); 751 if (error) { 752 mtx_unlock(&tp->tap_mtx); 753 return (error); --- 375 unchanged lines hidden --- | 746 ifr.ifr_mtu = tapp->mtu; 747 CURVNET_SET(ifp->if_vnet); 748 error = ifhwioctl(SIOCSIFMTU, ifp, 749 (caddr_t)&ifr, td); 750 CURVNET_RESTORE(); 751 if (error) { 752 mtx_unlock(&tp->tap_mtx); 753 return (error); --- 375 unchanged lines hidden --- |